From ad9b4eee5d88a4df11c2ab985e7a3ffb5a7e3e60 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Sat, 27 Jul 2013 01:50:26 +0200 Subject: [PATCH] Delete inactive sessions after 90 days. --- app/controllers/sessions_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/sessions_controller.rb b/app/controllers/sessions_controller.rb index 39f8326ce..3df9f04c9 100644 --- a/app/controllers/sessions_controller.rb +++ b/app/controllers/sessions_controller.rb @@ -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