tarantool-php / queue Goto Github PK
View Code? Open in Web Editor NEWPHP bindings for Tarantool Queue.
License: MIT License
PHP bindings for Tarantool Queue.
License: MIT License
Create a queue
queue = require 'queue'
queue.create_tube('test', 'limfifottl', {capacity = 1})
Next add records:
$queue = new Queue($client, 'test');
$result = $queue->put(45);
var_dump($result);
$result = $queue->put(45);
var_dump($result);
Output:
object(Tarantool\Queue\Task)#26 (3) {
["id":"Tarantool\Queue\Task":private]=>
int(0)
["state":"Tarantool\Queue\Task":private]=>
string(1) "r"
["data":"Tarantool\Queue\Task":private]=>
int(45)
}
PHP Fatal error: Uncaught TypeError: Argument 1 passed to Tarantool\Queue\Task::fromTuple() must be of the type array, null given, called in /vendor/tarantool/queue/src/Queue.php on line 45 and defined in /vendor/tarantool/queue/src/Task.php:34
Stack trace:
#0 /vendor/tarantool/queue/src/Queue.php(45): Tarantool\Queue\Task::fromTuple(NULL)
#1 /test.php(60): Tarantool\Queue\Queue->put(45)
#2 {main}
thrown in /vendor/tarantool/queue/src/Task.php on line 34
Expected output:
object(Tarantool\Queue\Task)#26 (3) {
["id":"Tarantool\Queue\Task":private]=>
int(0)
["state":"Tarantool\Queue\Task":private]=>
string(1) "r"
["data":"Tarantool\Queue\Task":private]=>
int(45)
}
NULL
$queue->statistics('tasks', 'total')
-> $queue->statistics('tasks.total')
See https://github.com/tarantool/queue#miscellaneous.
Related issues:
tarantool/tarantool-php#26
tarantool/queue#22
composer req -W tarantool/client:v0.10.0
./composer.json has been updated
Running composer update tarantool/client --with-all-dependencies
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Root composer.json requires tarantool/client v0.10.0, found tarantool/client[v0.10.0] but these were not loaded, likely because it conflicts with another require.
Problem 2
- tarantool/queue is locked to version v0.9.0 and an update of this package was not requested.
Hi,
I wonder if there is any example out there where I can use the php-client (for Tarantool ) to actually add SQL queries to the queue system in utube order or fifo order?
Thanks very much for any reply
Regards Zilveer
As a part of tarantool/doc#3501, we need to start recommending our users to utilize tt instead of the tarantoolctl utility. The README file mentions tarantoolctl in this section:
https://github.com/tarantool-php/queue#before-start
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.