Sha256: 2c837cbd97a8aedfcaea3c4b1ddcb17fd9ab3693195ef1b120d0e49c98f92405

Contents?: true

Size: 308 Bytes

Versions: 9

Compression:

Stored size: 308 Bytes

Contents

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

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
sidekiq-1.1.2 lib/sidekiq/middleware/server/unique_jobs.rb
sidekiq-1.1.1 lib/sidekiq/middleware/server/unique_jobs.rb
sidekiq-1.1.0 lib/sidekiq/middleware/server/unique_jobs.rb
sidekiq-1.0.0 lib/sidekiq/middleware/server/unique_jobs.rb
sidekiq-0.11.2 lib/sidekiq/middleware/server/unique_jobs.rb
sidekiq-0.11.1 lib/sidekiq/middleware/server/unique_jobs.rb
sidekiq-0.11.0 lib/sidekiq/middleware/server/unique_jobs.rb
sidekiq-0.10.1 lib/sidekiq/middleware/server/unique_jobs.rb
sidekiq-0.10.0 lib/sidekiq/middleware/server/unique_jobs.rb