refactor cron schedule

This commit is contained in:
albert
2013-03-15 11:04:31 -04:00
parent d8201b7c6d
commit a30cdb0b9c
2 changed files with 11 additions and 11 deletions

View File

@@ -0,0 +1,8 @@
class DailyMaintenance
def run
PostPruner.new.prune!
Upload.delete_all(['created_at < ?', 1.day.ago])
ModAction.delete_all(['created_at < ?', 3.days.ago])
Delayed::Job.destroy_all(['created_at < ?'], 1.day.ago)
end
end