Create: app/models/session.rb
Session = CGI::Session::ActiveRecordStore::Session
Session.class_eval do
def self.sweep!
delete_all ['updated_at < ?', 15.minutes.ago.utc]
end
Add One cron jobs and swap scheduled :
1 4 * * * /usr/local/bin/ruby /app/apps/current/script/runner -e production Session.sweep!
No comments:
Post a Comment