2019-12-04 14:29:43 +00:00
|
|
|
class ActiveJobLockCleanupJobScheduler < ActiveRecord::Migration[5.2]
|
|
|
|
def up
|
|
|
|
return if !Setting.find_by(name: 'system_init_done')
|
|
|
|
|
|
|
|
Scheduler.create_or_update(
|
|
|
|
name: 'Cleanup ActiveJob locks.',
|
|
|
|
method: 'ActiveJobLockCleanupJob.perform_now',
|
|
|
|
period: 1.day,
|
2020-01-23 11:45:58 +00:00
|
|
|
last_run: Time.zone.now,
|
2019-12-04 14:29:43 +00:00
|
|
|
prio: 2,
|
|
|
|
active: true,
|
|
|
|
updated_by_id: 1,
|
|
|
|
created_by_id: 1,
|
|
|
|
)
|
|
|
|
end
|
|
|
|
end
|