Sha256: 329fc8b2975084dd30f9a820e01914de83ed0445745f63f1c151ba80d36e97a6

Contents?: true

Size: 363 Bytes

Versions: 4

Compression:

Stored size: 363 Bytes

Contents

if defined?(Sidekiq)
  module Sidekiq
    module Middleware
      module Server
        class UniqueJobs
          def call(*args)
            yield
          ensure
            json = Sidekiq.dump_json(args[1])
            hash = Digest::MD5.hexdigest(json)
            Sidekiq.redis {|conn| conn.del(hash) }
          end
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
recommendable-1.1.7 lib/sidekiq/middleware/server/unique_jobs.rb
recommendable-1.1.6 lib/sidekiq/middleware/server/unique_jobs.rb
recommendable-1.1.5 lib/sidekiq/middleware/server/unique_jobs.rb
recommendable-1.1.4 lib/sidekiq/middleware/server/unique_jobs.rb