class CI::Queue::Redis::Supervisor
Public Instance Methods
build()
click to toggle source
# File lib/ci/queue/redis/supervisor.rb, line 15 def build @build ||= CI::Queue::Redis::BuildRecord.new(self, redis, config) end
master?()
click to toggle source
# File lib/ci/queue/redis/supervisor.rb, line 6 def master? false end
total()
click to toggle source
# File lib/ci/queue/redis/supervisor.rb, line 10 def total wait_for_master(timeout: config.queue_init_timeout) redis.get(key('total')).to_i end
wait_for_workers() { || ... }
click to toggle source
# File lib/ci/queue/redis/supervisor.rb, line 19 def wait_for_workers wait_for_master(timeout: config.queue_init_timeout) yield if block_given? time_left = config.timeout until exhausted? || time_left <= 0 || max_test_failed? sleep 1 time_left -= 1 yield if block_given? end exhausted? rescue CI::Queue::Redis::LostMaster false end