Reduced times till seen online notifications are removed.
This commit is contained in:
parent
10c49976d3
commit
4be5e8493d
1 changed files with 2 additions and 2 deletions
|
@ -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|
|
||||
|
|
Loading…
Reference in a new issue