From 0cfa9d6719ba098f989299d5269219fe4eed1d7c Mon Sep 17 00:00:00 2001 From: mfo Date: Tue, 24 Sep 2024 09:31:07 +0200 Subject: [PATCH] fix(batch): this is a hotfix, please be nice we just want to allow our infra to deal with BatchOperation when their is a big load --- app/jobs/batch_operation_enqueue_all_job.rb | 2 ++ app/jobs/batch_operation_process_one_job.rb | 1 + 2 files changed, 3 insertions(+) diff --git a/app/jobs/batch_operation_enqueue_all_job.rb b/app/jobs/batch_operation_enqueue_all_job.rb index 8a1ef6b2b..b6dd99079 100644 --- a/app/jobs/batch_operation_enqueue_all_job.rb +++ b/app/jobs/batch_operation_enqueue_all_job.rb @@ -1,6 +1,8 @@ # frozen_string_literal: true class BatchOperationEnqueueAllJob < ApplicationJob + queue_as :mailer # hotfix + def perform(batch_operation) batch_operation.enqueue_all end diff --git a/app/jobs/batch_operation_process_one_job.rb b/app/jobs/batch_operation_process_one_job.rb index f125227a6..e8b725b8e 100644 --- a/app/jobs/batch_operation_process_one_job.rb +++ b/app/jobs/batch_operation_process_one_job.rb @@ -1,6 +1,7 @@ # frozen_string_literal: true class BatchOperationProcessOneJob < ApplicationJob + queue_as :mailer # hotfix retry_on StandardError, attempts: 1 # default 5, for now no retryable behavior def perform(batch_operation, dossier)