Browse Source

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

Martin Edenhofer 9 years ago
parent
commit
a4323a7f99
1 changed files with 1 additions and 1 deletions
  1. 1 1
      app/models/online_notification.rb

+ 1 - 1
app/models/online_notification.rb

@@ -199,7 +199,7 @@ cleanup old online notifications
 
 
   def self.cleanup
   def self.cleanup
     OnlineNotification.where('created_at < ?', Time.zone.now - 12.months).delete_all
     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
     # notify all agents
     users = Ticket::ScreenOptions.agents
     users = Ticket::ScreenOptions.agents