diff options
author | adityacp | 2020-04-17 16:54:35 +0530 |
---|---|---|
committer | adityacp | 2020-04-17 16:54:35 +0530 |
commit | 348f2bc4f727b27abd9878334e886527479d260c (patch) | |
tree | b1652b2c981540a73d0bd87ebca13db4cea22ef0 /online_test/celery.py | |
parent | 4802a89acef7567c6a8861daab60924fe862367f (diff) | |
download | online_test-348f2bc4f727b27abd9878334e886527479d260c.tar.gz online_test-348f2bc4f727b27abd9878334e886527479d260c.tar.bz2 online_test-348f2bc4f727b27abd9878334e886527479d260c.zip |
Merge monitor, grade user and regrade intosingle dashboard
Diffstat (limited to 'online_test/celery.py')
-rw-r--r-- | online_test/celery.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/online_test/celery.py b/online_test/celery.py new file mode 100644 index 0000000..582f8a1 --- /dev/null +++ b/online_test/celery.py @@ -0,0 +1,19 @@ +from __future__ import absolute_import, unicode_literals + +import os +from django.conf import settings +from celery import Celery + +# set the default Django settings module for the 'celery' program. +os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'online_test.settings') + +app = Celery('online_test') + +# Using a string here means the worker doesn't have to serialize +# the configuration object to child processes. +# - namespace='CELERY' means all celery-related configuration keys +# should have a `CELERY_` prefix. +app.config_from_object('django.conf:settings', namespace='CELERY') + +# Load task modules from all registered Django app configs. +app.autodiscover_tasks(lambda: settings.INSTALLED_APPS) |