chore(job): same max_run_time between ArchiveCreationJob and ExportJob

This commit is contained in:
Colin Darie 2023-03-09 15:37:13 +01:00
parent 697aeeb348
commit 4288f28ac8
2 changed files with 9 additions and 1 deletions

View file

@ -1,6 +1,14 @@
class ArchiveCreationJob < ApplicationJob
queue_as :archives
before_perform do |job|
Sentry.set_tags(procedure: job.arguments.first.id)
end
def max_run_time
Archive::MAX_DUREE_GENERATION
end
def perform(procedure, archive, administrateur_or_instructeur)
archive.compute_with_safe_stale_for_purge do
ProcedureArchiveService

View file

@ -14,7 +14,7 @@ class Archive < ApplicationRecord
include TransientModelsWithPurgeableJobConcern
RETENTION_DURATION = 4.days
MAX_DUREE_GENERATION = 24.hours
MAX_DUREE_GENERATION = 16.hours
MAX_SIZE = 100.gigabytes
has_and_belongs_to_many :groupe_instructeurs