-
-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
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 34Expected 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)
}
NULLMetadata
Metadata
Assignees
Labels
No labels