Sha256: d529f5f42c331104b479c0aa49b01a97b587b6b03e56c670fc2a1990bd5bc148

Contents?: true

Size: 438 Bytes

Versions: 2

Compression:

Stored size: 438 Bytes

Contents

# frozen_string_literal: true

require_relative "base"

module SidekiqAlive
  module Redis
    # Wrapper for redis client adapter used by sidekiq > 7
    #
    class ClientAdapter < Base
      def set(key, time:, ex:)
        redis.call("SET", key, time, ex: ex)
      end

      def match(key)
        redis.scan("MATCH", key).map { |key| key }
      end

      def delete(key)
        redis.call("DEL", key)
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
sidekiq_alive-2.1.9 lib/sidekiq_alive/redis/client_adapter.rb
sidekiq_alive-2.1.8 lib/sidekiq_alive/redis/client_adapter.rb