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-10 23:16:12 -08:00

17 lines
310 B
Ruby

module Sidekiq
module Middleware
module Server
class UniqueJobs
def initialize(redis)
@redis = redis
end
def call(*args)
yield
ensure
@redis.del(Digest::MD5.hexdigest(MultiJson.encode(args[1])))
end
end
end
end
end