Method: ZSpec::Queue#pending_queue

Defined in:
lib/zspec/queue.rb

#pending_queueObject



71
72
73
74
75
76
77
78
79
80
81
82
83
# File 'lib/zspec/queue.rb', line 71

def pending_queue
  Enumerator.new do |yielder|
    until workers_ready? && complete?
      message = @sink.brpoplpush(@pending_queue_name, @processing_queue_name, timeout: 1)
      if message.nil?
        yielder << nil
        next
      end
      @sink.hset(, timeout_key(message), @sink.time.first)
      yielder << message
    end
  end
end