Added visibility_timeout and retry_on_timeout to CELERY_BROKER_TRANSPORT_OPTIONS

This commit is contained in:
Jelmer Draaijer 2020-08-28 09:24:54 +02:00
parent 4cbdc21515
commit 7f070ae37a

View File

@ -293,6 +293,12 @@ CELERY_TASK_SOFT_TIME_LIMIT = 60
# http://docs.celeryproject.org/en/latest/userguide/configuration.html#beat-scheduler # http://docs.celeryproject.org/en/latest/userguide/configuration.html#beat-scheduler
CELERY_BEAT_SCHEDULER = "django_celery_beat.schedulers:DatabaseScheduler" CELERY_BEAT_SCHEDULER = "django_celery_beat.schedulers:DatabaseScheduler"
CELERY_BROKER_TRANSPORT_OPTIONS = {
# https://docs.celeryproject.org/en/stable/getting-started/brokers/redis.html#id1
# increase the visibility timeout to match the time of the longest ETA youre planning to use.
"visibility_timeout": 60 * 60 * 1, # default is 1 hour
"retry_on_timeout": True,
}
{%- endif %} {%- endif %}
# django-allauth # django-allauth
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------