class SidekiqUniqueJobs::Locksmith
def drift(val)
-
(Integer)
- a computed drift value
Parameters:
-
val
(Integer
) -- the value to compute drift for
def drift(val) # Add 2 milliseconds to the drift to account for Redis expires # precision, which is 1 millisecond, plus 1 millisecond min drift # for small TTLs. (val.to_i * CLOCK_DRIFT_FACTOR).to_i + 2 end