vend / php-resque

PHP port of resque (Workers and Queueing)
MIT License
32 stars 9 forks source link

cli模式运行不成功,queue:list没有看到进程,怎么回事.. #22

Open gg22mm opened 6 years ago

gg22mm commented 6 years ago

//cli模式运行不成功,没有看到进程,怎么回事..

----------------添加任务可以----------- //添加任务 public function test() { $client = new Client([ 'scheme' => 'tcp', 'host' => '192.168.1.107', 'port' => 6379, 'password'=>'ddffff' ]);
$resque = new Resque($client); $id = $resque->enqueue('default_queue', 'app\controllers\job\Job', array('foo' => 'bar'), true);
$factory = new \Resque\Job\StatusFactory($resque);
$status = $factory->forId($id); echo $status->getStatus();
echo $id;exit; }

/ 输出结果 waiting dde79296875523eae5ad1f7bf6b872b4 / ----------------end 添加任务可以-----------

cli命令都不行,没有看到 queue:list 有值

方式一不行、

/usr/local/servers/php/bin/php /usr/local/servers/nginx/html/led/my_kj/vendor/vend/resque enqueue default_queue 'app\controllers\job\Job' -t /usr/local/servers/php/bin/php /usr/local/servers/nginx/html/led/my_kj/vendor/vend/resque queue:list

方式二不行、 /usr/local/servers/php/bin/php /usr/local/servers/nginx/html/led/my_kj/vendor/vend/resque worker -Q default -Q some_other_queue 'app\controllers\job\Job' -t /usr/local/servers/php/bin/php /usr/local/servers/nginx/html/led/my_kj/vendor/vend/resque queue:list

问:如何运行cli ?