From 9c4ca4b7d6b33bc32503c3647e0ab24f0855235e Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Tue, 8 Sep 2015 14:11:03 +0200 Subject: [PATCH] Cleanup unused stats store. --- app/models/stats_store.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/stats_store.rb b/app/models/stats_store.rb index fc7bf6035..992664a89 100644 --- a/app/models/stats_store.rb +++ b/app/models/stats_store.rb @@ -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