15 lines
386 B
Python
15 lines
386 B
Python
# core/celery.py
|
|
import os
|
|
from celery import Celery
|
|
|
|
# Set default Django settings module
|
|
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'core.settings')
|
|
|
|
app = Celery('core')
|
|
|
|
# Load config from Django settings, namespace CELERY
|
|
app.config_from_object('django.conf:settings', namespace='CELERY')
|
|
|
|
# Auto-discover tasks from all registered Django app configs
|
|
app.autodiscover_tasks()
|