-
Notifications
You must be signed in to change notification settings - Fork 209
no such table: background_task #14
Comments
Have you added background_task to your INSTALLED_APPS in your settings? Without that Django won't no to include it when running syncdb. On 7 July 2015 at 19:16, jayata notifications@github.com wrote:
|
Tanks a lot!! I knew I was missing something basic! Now the task is in the database, but never is executed???? my code is very simple, it just change the value of some variable, nothing else.... @background(schedule=5)
def check():
#my code here |
After running "python manage.py process_tasks" to process the scheduled tasks I got this stack trace:
|
It looks like you've defined your task inside you views.py file? This means that process_tasks can't find it. To ensure it can find it I'd This should be covered in the readme: https://github.com/lilspikey/django-background-task On 8 July 2015 at 19:53, jayata notifications@github.com wrote:
|
Yes it was exactly that, sorry English is not my native language..., I really want to get your app working in my project! after your corrections every seems to be OK, but when executed process_tasks throws a warning saying that @transaction.autocommit was deprecated and it must be replaced by set_autocommit, so I did and reinstalled. Now there is no warnings, but mys task is never executed, not even with process_tasks. I saw this issue #10 and I noticed that the time in the db is not the same than the machine's. Besides when run process_tasks got this:
Thanks for your time...I appreciate it. |
I think that error is because you have edited the source code and replace There is actually a pull request that's meant to be dealing with this: But it's not been merged in yet. On 9 July 2015 at 15:34, jayata notifications@github.com wrote:
|
Thanks, this pull request was very helpful. It works just fine with "python manage.py process_tasks" but the time issue still (the 'run_at' field in the db is about 4 or 5 hours ahead), what should I do? |
Have you got the right timezone set in your Django settings file? Reviewing the code it should be calling the right functions to deal with On 13 July 2015 at 15:40, jayata notifications@github.com wrote:
|
In my settings.py got this (defaults):
I'm using Ubuntu and this is the result of the "$ date" command: |
Hello @lilspikey , I'm still getting the error No Such Table: background_task even though I have "background_task" in my INSTALLED_APPS, what other possible reason might have caused it? |
Have you run syncdb?
|
Please disregard my comment, I reimplemented the entire sequence and now have other problems. May I first ask what version in Python and Django is this compatible to? I'm using Python 3.4.2 and Django 1.9.6. Now, what happened was I start receiving errors about package naming issues because apparently the name some import naming convention changed. I'm doing the following step:
What steps am I doing wrong? Thanks for the help! |
After I downloaded the fork version of this project here https://github.com/arteria/django-background-tasks, I am now back with my problem of No Such Table: background_task. I'm guessing that since I am only referencing an installed app, my project does not know that it should be creating a background_task table for that app, hence outputting "No migrations to apply" when I called 'manage.py makemigrations'. Do you have an idea how to resolve this? |
I’d take this up with the owners of that fork. This project currently doesn’t support the latest version of Django. It’s also only meant for Python 2 - not Python 3. I’m no longer using this project in production, so updates are unlikely for a while.
|
Hi, I'm very new at Django and all the 3rd party app world. I found yours and it seems very easy to use, I installed it, but when I ran an example had got this error "no such table: background_task". I notice that it have its own models.py file but after doing "$ sudo python setup.py install" in my database there is not a "background_task" table created, not even after doing "python manage.py makemigrations" or "syncdb", I'm afraid that I'm missing something. Hope you can help me.
The text was updated successfully, but these errors were encountered: