2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-04 08:47:37 +08:00

purge scheduler_stats every 1 month instead of 3

This commit is contained in:
Jeff Atwood 2017-04-28 15:05:15 -07:00
parent aba76bace6
commit a4815047c0

View file

@ -1,6 +1,6 @@
class SchedulerStat < ActiveRecord::Base
def self.purge_old
where('started_at < ?', 3.months.ago).delete_all
where('started_at < ?', 1.months.ago).delete_all
end
end