lib/sidekiq/lock/testing/inline.rb in sidekiq-lock-0.3.1 vs lib/sidekiq/lock/testing/inline.rb in sidekiq-lock-0.4.0

- old
+ new

@@ -1,8 +1,8 @@ def set_sidekiq_lock(worker_class, payload) options = worker_class.get_sidekiq_options['lock'] - Thread.current[Sidekiq::Lock::THREAD_KEY] = Sidekiq::Lock::RedisLock.new(options, payload) + Sidekiq.lock_container.store(Sidekiq::Lock::RedisLock.new(options, payload)) end def clear_sidekiq_lock - Thread.current[Sidekiq::Lock::THREAD_KEY] = nil + Sidekiq.lock_container.store(nil) end