Class: CI::Queue::Redis::Supervisor

Inherits:
Base
  • Object
show all
Defined in:
lib/ci/queue/redis/supervisor.rb

Instance Method Summary collapse

Methods inherited from Base

#empty?, #initialize, #progress, #size, #to_a, #wait_for_master, #workers_count

Constructor Details

This class inherits a constructor from CI::Queue::Redis::Base

Instance Method Details

#master? ⇒ Boolean

Returns:

  • (Boolean)


5
6
7
# File 'lib/ci/queue/redis/supervisor.rb', line 5

def master?
  false
end

#wait_for_workers ⇒ Object



9
10
11
12
13
14
# File 'lib/ci/queue/redis/supervisor.rb', line 9

def wait_for_workers
  return false unless wait_for_master

  sleep 0.1 until empty?
  true
end