Sha256: c7b866d758f8ae22f9796752f49b187ed0bac269877352ea413fcda1cc7a3276
Contents?: true
Size: 552 Bytes
Versions: 5
Compression:
Stored size: 552 Bytes
Contents
require 'unique_job/util' module UniqueJob class ClientMiddleware include Util def initialize(redis_options) @redis_options = redis_options end def call(worker_str, job, queue, redis_pool, &block) if job.has_key?('at') # perform_in or perform_at yield else if worker_str.class == String worker = worker_str.constantize.new # Sidekiq < 6 else worker = worker_str.new end perform_if_unique(worker, job['args'], &block) end end end end
Version data entries
5 entries across 5 versions & 1 rubygems