lib/atomic_sidekiq/atomic_operation/expire.rb in atomic-sidekiq-1.0.0 vs lib/atomic_sidekiq/atomic_operation/expire.rb in atomic-sidekiq-1.1.0

- old
+ new

@@ -1,19 +1,20 @@ module AtomicSidekiq module AtomicOperation class Expire < Base + EXPIRE_SCRIPT = File.read( + File.join(File.dirname(__FILE__), + "./lua_scripts/expire.lua") + ) + def initialize - super(in_flight_prefix: nil) + super(in_flight_keymaker: nil) end def perform(queue, in_flight_key) redis do |conn| conn.eval(EXPIRE_SCRIPT, [queue, in_flight_key], [Time.now.utc.to_i]) end end - - private - - EXPIRE_SCRIPT = File.read(File.join(File.dirname(__FILE__), './lua_scripts/expire.lua')) end end end