13 lines
302 B
Python
13 lines
302 B
Python
import os
|
|
|
|
from django.conf import settings
|
|
|
|
from celery import Celery
|
|
from datetime import timedelta
|
|
|
|
|
|
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "api.settings")
|
|
|
|
celery_app = Celery("api")
|
|
celery_app.config_from_object(f'django.conf:settings', namespace='CELERY')
|
|
celery_app.autodiscover_tasks() |