From cf76971666d7bcddb89ad4eb2d574716ebb4373a Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Sun, 8 Dec 2013 20:33:55 +0100 Subject: [PATCH] Added scheduler job to cleanup expired sessions issue#98. --- db/migrate/20131208000001_update_scheduler3.rb | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 db/migrate/20131208000001_update_scheduler3.rb diff --git a/db/migrate/20131208000001_update_scheduler3.rb b/db/migrate/20131208000001_update_scheduler3.rb new file mode 100644 index 000000000..bdf3e8f3c --- /dev/null +++ b/db/migrate/20131208000001_update_scheduler3.rb @@ -0,0 +1,15 @@ +class UpdateScheduler3 < ActiveRecord::Migration + def up + Scheduler.create_or_update( + :name => 'Cleanup expired sessions', + :method => 'SessionHelper.cleanup_expired', + :period => 60 * 60 * 24, + :prio => 2, + :active => true, + :updated_by_id => 1, + :created_by_id => 1, + ) + end + def down + end +end