Module: RRRSpec::DispatcherQueue
- Defined in:
- lib/rrrspec/redis_models.rb
Constant Summary collapse
- DISPATCHER_QUEUE_KEY =
'rrrspec:dispatcher_queue'
- DEFAULT_TIMEOUT =
10
Class Method Summary collapse
-
.notify ⇒ Object
Public: Check the active tasksets and dispatch them.
-
.wait(timeout = DEFAULT_TIMEOUT) ⇒ Object
Public: Wait for the check command.
Class Method Details
.notify ⇒ Object
Public: Check the active tasksets and dispatch them
59 60 61 |
# File 'lib/rrrspec/redis_models.rb', line 59 def self.notify RRRSpec.redis.rpush(DISPATCHER_QUEUE_KEY, 0) end |
.wait(timeout = DEFAULT_TIMEOUT) ⇒ Object
Public: Wait for the check command
64 65 66 |
# File 'lib/rrrspec/redis_models.rb', line 64 def self.wait(timeout=DEFAULT_TIMEOUT) RRRSpec.redis.blpop(DISPATCHER_QUEUE_KEY, timeout) end |