Sha256: a5168e283a9d6a15ca3ff7d7f7648c60e91e7439092c54274b23457cad0e5dec

Contents?: true

Size: 309 Bytes

Versions: 4

Compression:

Stored size: 309 Bytes

Contents

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

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
sidekiq-2.0.3 lib/sidekiq/middleware/server/unique_jobs.rb
sidekiq-2.0.2 lib/sidekiq/middleware/server/unique_jobs.rb
sidekiq-2.0.1 lib/sidekiq/middleware/server/unique_jobs.rb
sidekiq-2.0.0 lib/sidekiq/middleware/server/unique_jobs.rb