20191129102720_active_job_lock_cleanup_job_scheduler.rb 457 B

12345678910111213141516
  1. class ActiveJobLockCleanupJobScheduler < ActiveRecord::Migration[5.2]
  2. def up
  3. return if !Setting.exists?(name: 'system_init_done')
  4. Scheduler.create_or_update(
  5. name: 'Cleanup ActiveJob locks.',
  6. method: 'ActiveJobLockCleanupJob.perform_now',
  7. period: 1.day,
  8. last_run: Time.zone.now,
  9. prio: 2,
  10. active: true,
  11. updated_by_id: 1,
  12. created_by_id: 1,
  13. )
  14. end
  15. end