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.
This commit is contained in:
Drew Blessing 2017-04-19 16:34:26 -05:00
parent 509ff2ab17
commit 354e37b869
2 changed files with 6 additions and 0 deletions

View File

@ -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

View File

@ -0,0 +1,4 @@
---
title: Add retry to system hook worker
merge_request: 10801
author: