Switching to django celery for workers
This commit is contained in:
14
app_urls/core/celery.py
Normal file
14
app_urls/core/celery.py
Normal file
@@ -0,0 +1,14 @@
|
||||
# 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()
|
||||
Reference in New Issue
Block a user