ticket_escalation_rebuild_job.rb 289 B

12345678910111213141516
  1. class TicketEscalationRebuildJob < ApplicationJob
  2. include HasActiveJobLock
  3. def perform
  4. scope.in_batches.each_record do |ticket|
  5. ticket.escalation_calculation(true)
  6. end
  7. end
  8. private
  9. def scope
  10. Ticket.where(state_id: Ticket::State.by_category(:open))
  11. end
  12. end