add weekly maintenance script

This commit is contained in:
albert
2013-03-31 14:11:48 -04:00
parent b025256480
commit fc32a0023c
9 changed files with 96 additions and 13 deletions

View File

@@ -5,7 +5,6 @@ class DailyMaintenance
Upload.delete_all(['created_at < ?', 1.day.ago])
ModAction.delete_all(['created_at < ?', 3.days.ago])
Delayed::Job.delete_all(['created_at < ?'], 1.day.ago)
ApiCacheGenerator.new.generate_tag_cache
end
def prune_ad_hits