Skip to content

Commit 9565578

Browse files
humitosstsewd
andauthored
Celery: increase frequency of delete_closed_external_versions task (#10425)
* Celery: increase frequency of `delete_closed_external_versions` task We have 255k versions that should have been deleted already, but we are executing the task with a limit of 200 version. This makes the task to not catch up with all the versions that has to delete, and we keep accumulating them. This commit increases the frequency from "once a day" to "every 3 hours". It will help to catch up and to keep our database clean of closed PRs. Related readthedocs/readthedocs-ops#1291 * Update readthedocs/settings/base.py Co-authored-by: Santos Gallegos <[email protected]> --------- Co-authored-by: Santos Gallegos <[email protected]>
1 parent 29d74c9 commit 9565578

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

readthedocs/settings/base.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -511,9 +511,11 @@ def TEMPLATES(self):
511511
'delete': True,
512512
},
513513
},
514-
'every-day-delete-inactive-external-versions': {
514+
'every-three-hours-delete-inactive-external-versions': {
515515
'task': 'readthedocs.builds.tasks.delete_closed_external_versions',
516-
'schedule': crontab(minute=0, hour=1),
516+
# Increase the frequency because we have 255k closed versions and they keep growing.
517+
# It's better to increase this frequency than the `limit=` of the task.
518+
'schedule': crontab(minute=0, hour='*/3'),
517519
'options': {'queue': 'web'},
518520
},
519521
'every-day-resync-remote-repositories': {

0 commit comments

Comments
 (0)