Segment_QueueConsumer::flush PHP Method

flush() public method

Flushes our queue of messages by batching them to the server
public flush ( )
    public function flush()
    {
        $count = count($this->queue);
        $success = true;
        while ($count > 0 && $success) {
            $batch = array_splice($this->queue, 0, min($this->batch_size, $count));
            $success = $this->flushBatch($batch);
            $count = count($this->queue);
        }
        return $success;
    }