diff --git a/db/migrate/20210426000000_scheduler_session_timeout.rb b/db/migrate/20210426000000_scheduler_session_timeout.rb new file mode 100644 index 000000000..dfb4028f3 --- /dev/null +++ b/db/migrate/20210426000000_scheduler_session_timeout.rb @@ -0,0 +1,8 @@ +class SchedulerSessionTimeout < ActiveRecord::Migration[5.2] + def change + + return if !Setting.exists?(name: 'system_init_done') + + Scheduler.find_by(name: 'Cleanup dead sessions.').update(period: 1.hour) + end +end diff --git a/db/seeds/schedulers.rb b/db/seeds/schedulers.rb index bec27d043..a3f65c839 100644 --- a/db/seeds/schedulers.rb +++ b/db/seeds/schedulers.rb @@ -139,7 +139,7 @@ Scheduler.create_or_update( Scheduler.create_or_update( name: 'Cleanup dead sessions.', method: 'SessionTimeoutJob.perform_now', - period: 1.minute, + period: 1.hour, prio: 2, active: true, updated_by_id: 1,