Gab Social. All are welcome.
This commit is contained in:
11
app/workers/concerns/exponential_backoff.rb
Normal file
11
app/workers/concerns/exponential_backoff.rb
Normal file
@@ -0,0 +1,11 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module ExponentialBackoff
|
||||
extend ActiveSupport::Concern
|
||||
|
||||
included do
|
||||
sidekiq_retry_in do |count|
|
||||
15 + 10 * (count**4) + rand(10 * (count**4))
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user