lib/sidekiq/limit_fetch/global/semaphore.rb in sidekiq-limit_fetch-2.3.0 vs lib/sidekiq/limit_fetch/global/semaphore.rb in sidekiq-limit_fetch-2.4.0
- old
+ new
@@ -74,9 +74,13 @@
def pause
redis {|it| it.set "#{PREFIX}:pause:#@name", true }
end
+ def pause_for_ms ms
+ redis {|it| it.psetex "#{PREFIX}:pause:#@name", ms, true }
+ end
+
def unpause
redis {|it| it.del "#{PREFIX}:pause:#@name" }
end
def paused?