lib/sidekiq/lock.rb in sidekiq-lock-0.0.1 vs lib/sidekiq/lock.rb in sidekiq-lock-0.2.0

- old
+ new

@@ -1,16 +1,26 @@ -require "sidekiq/lock/version" -require "sidekiq/lock/worker" require "sidekiq/lock/middleware" require "sidekiq/lock/redis_lock" +require "sidekiq/lock/version" +require "sidekiq/lock/worker" module Sidekiq + + def self.lock_method + @lock_method || :lock + end + + def self.lock_method=(method) + @lock_method = method + end + module Lock THREAD_KEY = :sidekiq_lock end end Sidekiq.configure_server do |config| config.server_middleware do |chain| chain.add Sidekiq::Lock::Middleware end end +