From 269590bcc686109f75eac7c3d7a55416b1f5ebc8 Mon Sep 17 00:00:00 2001 From: Manu Vasconcelos <87862340+vasconsaurus@users.noreply.github.com> Date: Wed, 25 Sep 2024 16:52:27 -0300 Subject: [PATCH] set sidekiq_options retry to 3 for the GenericWorker (#2052) Pretty straight forward. Sets the maximum retry count to 3. Note We want to add custom retry logic, but that works differently between Sidekiq 5 and 6. So we think it is better to focus later on the Sidekiq upgrade, and until there, worker instances can handle their exceptions instead of relying on the generic worker for that. References: 5120, https://github.com/meedan/check-api/pull/2005 PR: 2052 --- app/workers/generic_worker.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/workers/generic_worker.rb b/app/workers/generic_worker.rb index 4915f97c2..012c9b06c 100644 --- a/app/workers/generic_worker.rb +++ b/app/workers/generic_worker.rb @@ -2,6 +2,8 @@ class GenericWorker include Sidekiq::Worker + sidekiq_options retry: 3 + def perform(klass_name, klass_method, *method_args) klass = klass_name.constantize options = method_args.extract_options!.with_indifferent_access