Files
old-riskletpy/backend/celery.py

15 lines
389 B
Python

# backend/celery.py
import os
from celery import Celery
# Set the default Django settings module
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'backend.settings')
# Create the Celery app
app = Celery('backend')
# Load configuration from Django settings
app.config_from_object('django.conf:settings', namespace='CELERY')
# Discover tasks in all installed apps
app.autodiscover_tasks()