django-celery-monitor/tests/proj/celery.py
2017-05-03 08:52:45 +02:00

15 lines
370 B
Python

from __future__ import absolute_import, unicode_literals
import os
from celery import Celery
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'proj.settings')
app = Celery('proj')
# Using a string here means the worker doesn't have to serialize
# the configuration object.
app.config_from_object('django.conf:settings', namespace='CELERY')
app.autodiscover_tasks()