Sha256: c126b0d706873e083221fa9d952c989ea1a456f727a2681860fe9a25ae12b46f

Contents?: true

Size: 455 Bytes

Versions: 4

Compression:

Stored size: 455 Bytes

Contents

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_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
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
atomic-sidekiq-1.1.4 lib/atomic_sidekiq/atomic_operation/expire.rb
atomic-sidekiq-1.1.3 lib/atomic_sidekiq/atomic_operation/expire.rb
atomic-sidekiq-1.1.2 lib/atomic_sidekiq/atomic_operation/expire.rb
atomic-sidekiq-1.1.0 lib/atomic_sidekiq/atomic_operation/expire.rb