Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDrew Blessing <drew@gitlab.com>2017-04-20 00:34:26 +0300
committerDrew Blessing <drew@gitlab.com>2017-04-20 00:44:49 +0300
commit354e37b8691eb96a225b0e0147549a742675f9d1 (patch)
tree32d577cd8ede30c21b5aa8521cd2b297721f2768 /app/workers
parent509ff2ab170802e23646282f1d146a6383b53a66 (diff)
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.rb2
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