1

I need to get statistics of a tube . This is my code :

$queue = new Phalcon\Queue\Beanstalk(array('host'=>'host','port'=>'port'));
$queue->choose('testTube');
//Insert the job in the queue
$queue->put(array('test' => 1000));


$queue->choose('testTube');
$queue->watch('testTube');

//var_dump($queue->statsTube('testTube'));

while (($job = $queue->peekReady()) !== false) {
    var_dump($job->getBody());
    $job->delete();
}

this is working. But when I do $queue->statsTube('testTube'), I have this error:

PHP Fatal error:  Uncaught exception 'RuntimeException' with message 'Call to undefined function yaml_parse()' in /var/www/html/queueing/testQueuePhp.php:62

I don't understand why, do I install yaml?

wxcvbn
  • 483
  • 2
  • 7
  • 20

1 Answers1

0

You should install Yaml module.

Some of the data returned from queue methods require that the module Yaml be installed. Please refer to this for more information. You will need to use Yaml >= 2.0.0

Reference: https://docs.phalconphp.com/en/3.2/queue

SND-KNN
  • 330
  • 3
  • 9