Sha256: c37f9acbc61105ad5b2cb1d9a34191945be9b763fedea7a7aff336518f976697

Contents?: true

Size: 434 Bytes

Versions: 1

Compression:

Stored size: 434 Bytes

Contents

module AtomicSidekiq
  module AtomicOperation
    class Expire < Base
      def initialize
        super(in_flight_prefix: 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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
atomic-sidekiq-1.0.0 lib/atomic_sidekiq/atomic_operation/expire.rb