File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -251,7 +251,7 @@ def delete_closed_external_versions(limit=200, days=30 * 3):
251
251
queryset = Version .external .filter (
252
252
state = EXTERNAL_VERSION_STATE_CLOSED ,
253
253
modified__lte = days_ago ,
254
- )[:limit ]
254
+ ). order_by ( "modified" ) [:limit ]
255
255
for version in queryset :
256
256
try :
257
257
last_build = version .last_build
Original file line number Diff line number Diff line change @@ -546,11 +546,11 @@ def TEMPLATES(self):
546
546
"delete" : True ,
547
547
},
548
548
},
549
- "every-three-hours -delete-inactive-external-versions" : {
549
+ "every-30m -delete-inactive-external-versions" : {
550
550
"task" : "readthedocs.builds.tasks.delete_closed_external_versions" ,
551
551
# Increase the frequency because we have 255k closed versions and they keep growing.
552
552
# It's better to increase this frequency than the `limit=` of the task.
553
- "schedule" : crontab (minute = 0 , hour = "*/3 " ),
553
+ "schedule" : crontab (minute = "*/30" , hour = "*" ),
554
554
"options" : {"queue" : "web" },
555
555
},
556
556
"every-day-resync-remote-repositories" : {
You can’t perform that action at this time.
0 commit comments