1
我已經爲Laravel安裝了Pheanstalk包(https://github.com/mikelbring/Pheanstalk) 我現在正在跟蹤基本示例代碼,嘗試將作業傳遞給隊列並將其重新取回。Pheanstalk在Laravel,一切都結束了作爲一個未處理的響應?
這是我的代碼:
Route::get('queue', function()
{
Pheanstalk::useTube('testtube')->put("job payload goes here\n");
$pheanstalk = Pheanstalk::connection();
$job = $pheanstalk
->watch('testtube')
->ignore('default')
->reserve();
echo $job->getData();
$pheanstalk->delete($job);
});
然而,當我運行它,我得到一個「未處理的響應」的錯誤,像什麼已經歸還。
Unhandled Exception
Message:
Unhandled response:
Location:
C:\wamp\www\adam\phire\bundles\pheanstalk\pheanstalk\classes\Pheanstalk\Command\PutCommand.php on line 108
Stack Trace:
#0 C:\wamp\www\adam\phire\bundles\pheanstalk\pheanstalk\classes\Pheanstalk\Connection.php(121): Pheanstalk_Command_PutCommand->parseResponse('', NULL)
#1 C:\wamp\www\adam\phire\bundles\pheanstalk\pheanstalk\classes\Pheanstalk.php(511): Pheanstalk_Connection->dispatchCommand(Object(Pheanstalk_Command_PutCommand))
#2 C:\wamp\www\adam\phire\bundles\pheanstalk\pheanstalk\classes\Pheanstalk.php(273): Pheanstalk\Pheanstalk->_dispatch(Object(Pheanstalk_Command_PutCommand))
#3 C:\wamp\www\adam\phire\application\routes.php(45): Pheanstalk\Pheanstalk->put('job payload goe...')
#4 [internal function]: Laravel\Bundle::{closure}()
#5 C:\wamp\www\adam\phire\laravel\routing\route.php(163): call_user_func_array(Object(Closure), Array)
#6 C:\wamp\www\adam\phire\laravel\routing\route.php(124): Laravel\Routing\Route->response()
#7 C:\wamp\www\adam\phire\laravel\laravel.php(167): Laravel\Routing\Route->call()
#8 C:\wamp\www\adam\phire\public\index.php(34): require('C:\wamp\www\ada...')
#9 {main}
是否有人熟悉Pheanstalk並能提供一些幫助?
謝謝 亞當。
不幸的是,我看到的唯一選擇是向「Laravel Pheanstalk」捆綁維護者https://github.com/mikelbring/Pheanstalk/issues發送一個錯誤,或者如果找到修復請求,則發出拉取請求: - / – 2013-04-22 15:11:37