application_job.rb 719 B

12345678910111213141516171819202122
  1. # Copyright (C) 2012-2023 Zammad Foundation, https://zammad-foundation.org/
  2. class ApplicationJob < ActiveJob::Base
  3. include ApplicationJob::HasDelayedJobMonitoringCompatibilty
  4. include ApplicationJob::HasQueuingPriority
  5. include ApplicationJob::HasCustomLogging
  6. discard_on HasActiveJobLock::LockKeyNotGeneratable
  7. ActiveJob::LogSubscriber.detach_from :active_job
  8. # See config/initializers/delayed_jobs_timeout_per_job.rb for details.
  9. def self.max_run_time
  10. 4.hours
  11. end
  12. # Automatically retry jobs that encountered a deadlock
  13. # retry_on ActiveRecord::Deadlocked
  14. # Most jobs are safe to ignore if the underlying records are no longer available
  15. # discard_on ActiveJob::DeserializationError
  16. end