Skip to content

Commit 55463c0

Browse files
committed
Setup task to be ran by celery beat
1 parent 38926c7 commit 55463c0

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

readthedocs/settings/base.py

+11
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88

99
from readthedocs.core.settings import Settings
1010

11+
from celery.schedules import crontab
12+
13+
1114
try:
1215
import readthedocsext # noqa
1316
ext = True
@@ -241,6 +244,14 @@ def USE_PROMOS(self): # noqa
241244
CELERY_CREATE_MISSING_QUEUES = True
242245

243246
CELERY_DEFAULT_QUEUE = 'celery'
247+
CELERYBEAT_SCHEDULE = {
248+
# Ran every hour on minute 30
249+
'hourly-remove-orphan-symlinks': {
250+
'task': 'readthedocs.projects.tasks.remove_orphan_symlinks',
251+
'schedule': crontab(minute=30),
252+
'options': {'queue': 'web'},
253+
},
254+
}
244255

245256
# Docker
246257
DOCKER_ENABLE = False

0 commit comments

Comments
 (0)