mirror of
https://github.com/mperham/sidekiq.git
synced 2022-11-09 13:52:34 -05:00
17 lines
310 B
Ruby
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
|