20191129102720_active_job_lock_cleanup_job_scheduler.rb 534 B

123456789101112131415161718
  1. # Copyright (C) 2012-2022 Zammad Foundation, https://zammad-foundation.org/
  2. class ActiveJobLockCleanupJobScheduler < ActiveRecord::Migration[5.2]
  3. def up
  4. return if !Setting.exists?(name: 'system_init_done')
  5. Scheduler.create_or_update(
  6. name: 'Cleanup ActiveJob locks.',
  7. method: 'ActiveJobLockCleanupJob.perform_now',
  8. period: 1.day,
  9. last_run: Time.zone.now,
  10. prio: 2,
  11. active: true,
  12. updated_by_id: 1,
  13. created_by_id: 1,
  14. )
  15. end
  16. end