Improved cleanup again, reduced time to remove of old seen messages.

This commit is contained in:
Martin Edenhofer 2015-07-01 00:45:15 +02:00
parent ec46aca820
commit a4323a7f99

View file

@ -199,7 +199,7 @@ cleanup old online notifications
def self.cleanup
OnlineNotification.where('created_at < ?', Time.zone.now - 12.months).delete_all
OnlineNotification.where('seen = ? AND created_at < ?', true, Time.zone.now - 2.days).delete_all
OnlineNotification.where('seen = ? AND created_at < ?', true, Time.zone.now - 1.days).delete_all
# notify all agents
users = Ticket::ScreenOptions.agents