Fix Celery: use autodiscover_tasks with full module path
This commit is contained in:
+1
-1
@@ -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'])
|
||||||
@@ -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")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user