Fix Celery: use autodiscover_tasks with full module path

This commit is contained in:
2026-05-05 12:39:45 +02:00
parent b50ab06a22
commit 503233d323
2 changed files with 1 additions and 2 deletions
+1 -1
View File
@@ -5,4 +5,4 @@ app = Celery('proyecto')
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'proyecto.settings') os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'proyecto.settings')
app.config_from_object('django.conf:settings', namespace="CELERY") app.config_from_object('django.conf:settings', namespace="CELERY")
# Tasks loaded via CELERY_IMPORTS in settings.py app.autodiscover_tasks(['tienda.tasks'])
-1
View File
@@ -423,7 +423,6 @@ CELERY_RESULT_BACKEND = os.getenv("REDIS_URL", "redis://localhost:6379/0")
CELERY_ACCEPT_CONTENT = ['json'] CELERY_ACCEPT_CONTENT = ['json']
CELERY_TASK_SERIALIZER = 'json' CELERY_TASK_SERIALIZER = 'json'
CELERY_RESULT_SERIALIZER = 'json' CELERY_RESULT_SERIALIZER = 'json'
CELERY_IMPORTS = ['tienda.tasks']
SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTO", "https") SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTO", "https")