From 354e37b8691eb96a225b0e0147549a742675f9d1 Mon Sep 17 00:00:00 2001 From: Drew Blessing Date: Wed, 19 Apr 2017 16:34:26 -0500 Subject: Add retry to system hook worker The default number of Sidekiq retries is 25 over about 21 days. If an external system is unavailable for a length of time, hooks can pile up in the Sidekiq queues. If the situation gets bad enough the retry jobs dropping back into the main queue can slow down other jobs. Limit the retries to a sane number to avoid this scenario. --- app/workers/system_hook_worker.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'app/workers') diff --git a/app/workers/system_hook_worker.rb b/app/workers/system_hook_worker.rb index baf2f12eeac..55d4e7d6dab 100644 --- a/app/workers/system_hook_worker.rb +++ b/app/workers/system_hook_worker.rb @@ -2,6 +2,8 @@ class SystemHookWorker include Sidekiq::Worker include DedicatedSidekiqQueue + sidekiq_options retry: 4 + def perform(hook_id, data, hook_name) SystemHook.find(hook_id).execute(data, hook_name) end -- cgit v1.2.3