Removed not used sessions with 60 days.
This commit is contained in:
parent
625b7961ab
commit
c2297ff210
1 changed files with 2 additions and 2 deletions
|
@ -31,8 +31,8 @@ module SessionHelper
|
|||
# delete temp. sessions
|
||||
ActiveRecord::SessionStore::Session.where('persistent IS NULL AND updated_at < ?', Time.zone.now - 2.hours ).delete_all
|
||||
|
||||
# web sessions older the x days
|
||||
ActiveRecord::SessionStore::Session.where('updated_at < ?', Time.zone.now - 90.days ).delete_all
|
||||
# web sessions not updated the last x days
|
||||
ActiveRecord::SessionStore::Session.where('updated_at < ?', Time.zone.now - 60.days ).delete_all
|
||||
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue