Removed not used sessions with 60 days.

This commit is contained in:
Martin Edenhofer 2015-09-08 09:55:47 +02:00
parent 625b7961ab
commit c2297ff210

View file

@ -31,8 +31,8 @@ module SessionHelper
# delete temp. sessions # delete temp. sessions
ActiveRecord::SessionStore::Session.where('persistent IS NULL AND updated_at < ?', Time.zone.now - 2.hours ).delete_all ActiveRecord::SessionStore::Session.where('persistent IS NULL AND updated_at < ?', Time.zone.now - 2.hours ).delete_all
# web sessions older the x days # web sessions not updated the last x days
ActiveRecord::SessionStore::Session.where('updated_at < ?', Time.zone.now - 90.days ).delete_all ActiveRecord::SessionStore::Session.where('updated_at < ?', Time.zone.now - 60.days ).delete_all
end end