chore(job): same max_run_time between ArchiveCreationJob and ExportJob
This commit is contained in:
parent
697aeeb348
commit
4288f28ac8
2 changed files with 9 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue