for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of the Phive Queue package.
*
* (c) Eugene Leonovich <[email protected]>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Phive\Queue\Tests\Handler;
use Phive\Queue\TarantoolQueue;
class TarantoolHandler extends Handler
{
/**
* @var \Tarantool
private $tarantool;
public function createQueue()
return new TarantoolQueue(
$this->tarantool,
$this->getOption('tube_name'),
$this->getOption('space')
);
}
public function clear()
$this->tarantool->call('queue.truncate', [
$this->getOption('space'),
]);
protected function configure()
$this->tarantool = new \Tarantool($this->getOption('host'), $this->getOption('port'));