lib/sidekiq/limit_fetch/global/semaphore.rb in sidekiq-limit_fetch-1.1 vs lib/sidekiq/limit_fetch/global/semaphore.rb in sidekiq-limit_fetch-1.2
- old
+ new
@@ -44,9 +44,14 @@
def block
redis {|it| it.set "#{PREFIX}:block:#@name", true }
end
+ def block_except(*queues)
+ raise ArgumentError if queues.empty?
+ redis {|it| it.set "#{PREFIX}:block:#@name", queues.join(',') }
+ end
+
def unblock
redis {|it| it.del "#{PREFIX}:block:#@name" }
end
def blocking?