Просмотр исходного кода

Reduced times till seen online notifications are removed.

Martin Edenhofer 9 лет назад
Родитель
Сommit
4be5e8493d
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      app/models/online_notification.rb

+ 2 - 2
app/models/online_notification.rb

@@ -199,8 +199,8 @@ 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 - 12.hours).delete_all
-    OnlineNotification.where('seen = ? AND updated_at < ?', true, Time.zone.now - 2.hours).delete_all
+    OnlineNotification.where('seen = ? AND created_at < ?', true, Time.zone.now - 4.hours).delete_all
+    OnlineNotification.where('seen = ? AND updated_at < ?', true, Time.zone.now - 1.hours).delete_all
 
     # notify all agents
     User.of_role('Agent').each {|user|