354e37b869
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.
10 lines
214 B
Ruby
10 lines
214 B
Ruby
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
|
|
end
|