lib/ci/queue/redis/base.rb in ci-queue-0.50.0 vs lib/ci/queue/redis/base.rb in ci-queue-0.51.0

- old
+ new

@@ -137,16 +137,19 @@ total - size end def wait_for_master(timeout: 30) return true if master? + return true if queue_initialized? + (timeout * 10 + 1).to_i.times do if queue_initialized? return true else sleep 0.1 end end + raise LostMaster, "The master worker is still `#{master_status}` after #{timeout} seconds waiting." end def workers_count redis.scard(key('workers'))