Cleanup unused stats store.
This commit is contained in:
parent
692a9346fa
commit
9c4ca4b7d6
1 changed files with 1 additions and 1 deletions
|
@ -127,7 +127,7 @@ optional you can parse the max oldest stats store entries
|
|||
=end
|
||||
|
||||
def self.cleanup(diff = 3.months)
|
||||
StatsStore.where('created_at < ?', Time.zone.now - diff).delete_all
|
||||
StatsStore.where('updated_at < ?', Time.zone.now - diff).delete_all
|
||||
true
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue