active_job_lock_cleanup_job.rb 268 B

123456789
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. class ActiveJobLockCleanupJob < ApplicationJob
  3. include HasActiveJobLock
  4. def perform(diff = 1.day)
  5. ::ActiveJobLock.where('created_at < ?', Time.zone.now - diff).destroy_all
  6. end
  7. end