tarantool-php / client

PHP client for Tarantool.
MIT License
67 stars 22 forks source link

Use Php-client with queue? #52

Closed zilveer closed 5 years ago

zilveer commented 5 years ago

Hi, I wonder if it is possible to use the Tarantool php-client with the queue system and if so can you please provide an example ?

Regards

rybakit commented 5 years ago

You can find the example in the queue's README. tl;dr:

use Tarantool\Queue\Queue;
use Tarantool\Client\Client;

$client = Client::fromDefaults();
$queue = new Queue($client, 'my-queue-name');
zilveer commented 5 years ago

@rybakit

Thank you for the response. Do you mean like this?

use Tarantool\Queue\Queue;
use Tarantool\Client\Client;

$client = Client::fromDefaults();
$queue = new Queue($client->executeUpdate('
    CREATE TABLE users ("id" INTEGER PRIMARY KEY AUTOINCREMENT, "email" VARCHAR(255))
'), 'my-queue-name');

Regards

rybakit commented 5 years ago

Closed as duplicate of https://github.com/tarantool-php/queue/issues/16.