2024-04-29 00:17:15 +02:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2021-10-13 14:41:05 +02:00
|
|
|
class DossierRebaseJob < ApplicationJob
|
2023-03-09 15:18:14 +01:00
|
|
|
queue_as :low_priority # they are massively enqueued, so don't interfere with others especially antivirus
|
|
|
|
|
2021-10-13 14:41:05 +02:00
|
|
|
# If by the time the job runs the Dossier has been deleted, ignore the rebase
|
|
|
|
discard_on ActiveRecord::RecordNotFound
|
|
|
|
|
|
|
|
def perform(dossier)
|
|
|
|
dossier.rebase!
|
|
|
|
end
|
|
|
|
end
|