Fixes #3526 - Default session timeout verification on backend only once a hour.
This commit is contained in:
parent
af461e11dd
commit
f46b8712a1
2 changed files with 9 additions and 1 deletions
8
db/migrate/20210426000000_scheduler_session_timeout.rb
Normal file
8
db/migrate/20210426000000_scheduler_session_timeout.rb
Normal file
|
@ -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
|
|
@ -139,7 +139,7 @@ Scheduler.create_or_update(
|
||||||
Scheduler.create_or_update(
|
Scheduler.create_or_update(
|
||||||
name: 'Cleanup dead sessions.',
|
name: 'Cleanup dead sessions.',
|
||||||
method: 'SessionTimeoutJob.perform_now',
|
method: 'SessionTimeoutJob.perform_now',
|
||||||
period: 1.minute,
|
period: 1.hour,
|
||||||
prio: 2,
|
prio: 2,
|
||||||
active: true,
|
active: true,
|
||||||
updated_by_id: 1,
|
updated_by_id: 1,
|
||||||
|
|
Loading…
Reference in a new issue