Skip to content

Commit 4ed9e83

Browse files
authored
Celery: increase the "visibility timeout" from 1h to 5h (#12342)
This is the time Celery waits for the worker to ack the task. After this time, Celery will re-deliver this task to another worker. ``` In [1]: from readthedocs.worker import app In [2]: app.conf.get("BROKER_TRANSPORT_OPTIONS") Out[2]: {'visibility_timeout': 18000} ``` Closes #12317
1 parent ab1d7c7 commit 4ed9e83

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

readthedocs/settings/base.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -602,6 +602,12 @@ def TEMPLATES(self):
602602
CELERYD_PREFETCH_MULTIPLIER = 1
603603
CELERY_CREATE_MISSING_QUEUES = True
604604

605+
# https://github.com/readthedocs/readthedocs.org/issues/12317#issuecomment-3070950434
606+
# https://docs.celeryq.dev/en/stable/getting-started/backends-and-brokers/redis.html#visibility-timeout
607+
BROKER_TRANSPORT_OPTIONS = {
608+
'visibility_timeout': 18000, # 5 hours
609+
}
610+
605611
CELERY_DEFAULT_QUEUE = "celery"
606612
CELERYBEAT_SCHEDULER = "django_celery_beat.schedulers:DatabaseScheduler"
607613
CELERYBEAT_SCHEDULE = {

0 commit comments

Comments
 (0)