有一个php库https://github.com/tarantool-php/queue,但是它需要ext- tarantool,那么是否有任何纯用php编写的活动可维护库,允许我们在php 5.6或7中使用tarantool队列?或者,是否有现成的软件包可供centos安装php5.6的ext-tarantool?yum install php-tarantool给出了以下不兼容错误
Error: Package: php-tarantool-0.1.0-19.el6.x86_64 (tarantool_1_6)
Requires: php(zend-abi) = 20090626
Installed: php-common-5.6.19-1.el6.remi.x86_64 (@remi-php56)
php(zend-abi) = 20131226-64发布于 2016-03-24 13:04:41
我是tarantool/queue库的作者。我计划在将来增加对纯PHP Tarantool客户端的支持,只是现在还没有。免费填写一张罚单;)
与此同时,作为一种解决办法,您可以使用Tarantool\Client类来装饰\Tarantool,例如:
use Tarantool\Client;
class Tarantool
{
private $client;
public function __construct(Client $client)
{
$this->client = $client;
}
public function call($functionName, array $args = null)
{
$result = $this->client->call($functionName, $args ? $args : []);
return $result->getData();
}
}然后像这样使用它:
use Tarantool\Client;
use Tarantool\Connection\SocketConnection;
use Tarantool\Packer\PurePacker;
use Tarantool\Queue\Queue;
$client = new Client(new SocketConnection(), new PurePacker());
$client = new Tarantool($client);
$queue = new Queue($client, 'foobar');https://stackoverflow.com/questions/36199909
复制相似问题