15 lines
297 B
Python
15 lines
297 B
Python
import os
|
|
|
|
from celery import Celery
|
|
from django.conf import settings
|
|
|
|
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'core.settings')
|
|
|
|
app = Celery(
|
|
'core',
|
|
broker=settings.CELERY_BROKER_URL,
|
|
)
|
|
|
|
app.config_from_object('django.conf:settings', namespace='CELERY')
|
|
app.autodiscover_tasks()
|