def process_queue
      loop do
        sleep 1 until processing?
        buffer = @queue.shift(BATCH_SIZE)
        if buffer.size > 0
          rpc_client.notification('/containers/log_batch', [buffer])
          sleep 0.01
        else
          sleep 1
        end
      end
    end
def process_queue
      loop do
        sleep 1 until processing?
        buffer = @queue.shift(BATCH_SIZE)
        if buffer.size > 0
          rpc_client.notification('/containers/log_batch', [buffer])
          sleep 0.01
        else
          sleep 1
        end
      end
    end
Process items from @queue