update celery call
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user