Delete inactive sessions after 90 days.
This commit is contained in:
parent
dd27ad8566
commit
ad9b4eee5d
1 changed files with 1 additions and 1 deletions
|
@ -169,7 +169,7 @@ class SessionsController < ApplicationController
|
|||
end
|
||||
|
||||
def delete_old
|
||||
ActiveRecord::SessionStore::Session.where('request_type = ? AND updated_at < ?', 1, Time.now - 150.days ).delete_all
|
||||
ActiveRecord::SessionStore::Session.where('request_type = ? AND updated_at < ?', 1, Time.now - 90.days ).delete_all
|
||||
ActiveRecord::SessionStore::Session.where('request_type = ? AND updated_at < ?', 2, Time.now - 2.days ).delete_all
|
||||
render :json => {}
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue