1
0
Fork 0
mirror of https://github.com/mperham/sidekiq.git synced 2022-11-09 13:52:34 -05:00

No need to hold the connection while doing other things

This commit is contained in:
Mike Perham 2012-03-26 19:54:04 -07:00
parent 2e9e3a5064
commit 7eaa50461d

View file

@ -5,7 +5,9 @@ module Sidekiq
def call(*args)
yield
ensure
Sidekiq.redis {|conn| conn.del(Digest::MD5.hexdigest(MultiJson.encode(args[1]))) }
json = MultiJson.encode(args[1])
hash = Digest::MD5.hexdigest(json)
Sidekiq.redis {|conn| conn.del(hash) }
end
end
end