class Lambdakiq::Backoff

Constants

MAX_VISIBILITY_TIMEOUT

Attributes

count[R]

Public Class Methods

backoff(count) click to toggle source
# File lib/lambdakiq/backoff.rb, line 10
def backoff(count)
  new(count).backoff
end
new(count) click to toggle source
# File lib/lambdakiq/backoff.rb, line 16
def initialize(count)
  @count = count
end

Public Instance Methods

backoff() click to toggle source

From Sidekiq: git.io/fhi5O

# File lib/lambdakiq/backoff.rb, line 22
def backoff
  case count
  when 1 then 30
  when 2 then 46
  when 3 then 76
  when 4 then 156
  when 5 then 346
  when 6 then 730
  when 7 then 1416
  when 8 then 2536
  when 9 then 4246
  when 10 then 6726
  when 11 then 10180
  when 12 then 14836
  end
end