diff options
author | Drew Blessing <drew@gitlab.com> | 2017-04-19 16:34:26 -0500 |
---|---|---|
committer | Drew Blessing <drew@gitlab.com> | 2017-04-19 16:44:49 -0500 |
commit | 354e37b8691eb96a225b0e0147549a742675f9d1 (patch) | |
tree | 32d577cd8ede30c21b5aa8521cd2b297721f2768 /app/workers | |
parent | 509ff2ab170802e23646282f1d146a6383b53a66 (diff) | |
download | gitlab-ce-354e37b8691eb96a225b0e0147549a742675f9d1.tar.gz |
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.
Diffstat (limited to 'app/workers')
-rw-r--r-- | app/workers/system_hook_worker.rb | 2 |
1 files changed, 2 insertions, 0 deletions
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 |