update celery call

This commit is contained in:
2017-02-06 19:11:32 +01:00
parent 288abf1ad0
commit 3a48ac9c6b
3 changed files with 23 additions and 4 deletions

View File

@@ -1,5 +1,6 @@
from __future__ import absolute_import, unicode_literals
import os
import django
from celery import Celery
# set the default Django settings module for the 'celery' program.
@@ -14,7 +15,11 @@ app = Celery('caromserver')
app.config_from_object('django.conf:settings')
# Load task modules from all registered Django app configs.
#app.autodiscover_tasks()
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "caromserver.settings")
django.setup()
app.autodiscover_tasks(['billard'])
@app.task(bind=True)