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:
parent
509ff2ab17
commit
354e37b869
2 changed files with 6 additions and 0 deletions
|
@ -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
|
||||
|
|
4
changelogs/unreleased/hook_retries.yml
Normal file
4
changelogs/unreleased/hook_retries.yml
Normal file
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
title: Add retry to system hook worker
|
||||
merge_request: 10801
|
||||
author:
|
Loading…
Reference in a new issue