diff --git a/{{cookiecutter.project_slug}}/config/settings/base.py b/{{cookiecutter.project_slug}}/config/settings/base.py index f69908c2d..b9ffe8a78 100644 --- a/{{cookiecutter.project_slug}}/config/settings/base.py +++ b/{{cookiecutter.project_slug}}/config/settings/base.py @@ -293,6 +293,12 @@ CELERY_TASK_SOFT_TIME_LIMIT = 60 # http://docs.celeryproject.org/en/latest/userguide/configuration.html#beat-scheduler 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 you’re planning to use. + "visibility_timeout": 60 * 60 * 1, # default is 1 hour + "retry_on_timeout": True, +} {%- endif %} # django-allauth # ------------------------------------------------------------------------------