1
0
Fork 0
mirror of https://github.com/mperham/sidekiq.git synced 2022-11-09 13:52:34 -05:00
mperham--sidekiq/lib/sidekiq/middleware/server/unique_jobs.rb
2012-02-08 17:04:19 -08:00

17 lines
No EOL
311 B
Ruby

module Sidekiq
module Middleware
module Server
class UniqueJobs
def initialize(redis)
@redis = redis
end
def call(worker, msg)
yield
ensure
@redis.del(Digest::MD5.hexdigest(MultiJson.encode(msg)))
end
end
end
end
end