Phive\Queue\TarantoolQueue::pop PHP Method

pop() public method

public pop ( )
    public function pop()
    {
        $result = $this->tarantool->call('queue.take', [$this->space, $this->tubeName, '0.00000001']);
        if (0 === $result['count']) {
            throw new NoItemAvailableException($this);
        }
        $tuple = $result['tuples_list'][0];
        $this->tarantool->call('queue.delete', [$this->space, $tuple[0]]);
        return substr($tuple[3], 0, -9);
    }