{"id":1658,"date":"2022-08-30T15:18:22","date_gmt":"2022-08-30T15:18:22","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2013\/11\/27\/pheanstalk-in-laravel-everything-ends-up-as-an-unhandled-response-collection-of-common-programming-errors\/"},"modified":"2022-08-30T15:18:22","modified_gmt":"2022-08-30T15:18:22","slug":"pheanstalk-in-laravel-everything-ends-up-as-an-unhandled-response-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/pheanstalk-in-laravel-everything-ends-up-as-an-unhandled-response-collection-of-common-programming-errors\/","title":{"rendered":"Pheanstalk in Laravel, Everything ends up as an unhandled response?-Collection of common programming errors"},"content":{"rendered":"<p>Ive installed the Pheanstalk bundle for Laravel (https:\/\/github.com\/mikelbring\/Pheanstalk) I am now following the basic example code to try and pass a job to the queue and retrieve it back again.<\/p>\n<p>This is my code:<\/p>\n<pre><code>Route::get('queue', function()\n{\n\nPheanstalk::useTube('testtube')-&gt;put(\"job payload goes here\\n\");\n\n$pheanstalk = Pheanstalk::connection();\n\n$job = $pheanstalk\n  -&gt;watch('testtube')\n  -&gt;ignore('default')\n  -&gt;reserve();\n\necho $job-&gt;getData();\n\n$pheanstalk-&gt;delete($job);\n});\n<\/code><\/pre>\n<p>Yet when i run it, i get an &#8216;Unhandled Response&#8217; error, like nothing has been returned.<\/p>\n<pre><code>Unhandled Exception\n\nMessage:\n\nUnhandled response: \nLocation:\n\nC:\\wamp\\www\\adam\\phire\\bundles\\pheanstalk\\pheanstalk\\classes\\Pheanstalk\\Command\\PutCommand.php on line 108\nStack Trace:\n\n #0 C:\\wamp\\www\\adam\\phire\\bundles\\pheanstalk\\pheanstalk\\classes\\Pheanstalk\\Connection.php(121): Pheanstalk_Command_PutCommand-&gt;parseResponse('', NULL)\n#1 C:\\wamp\\www\\adam\\phire\\bundles\\pheanstalk\\pheanstalk\\classes\\Pheanstalk.php(511): Pheanstalk_Connection-&gt;dispatchCommand(Object(Pheanstalk_Command_PutCommand))\n#2 C:\\wamp\\www\\adam\\phire\\bundles\\pheanstalk\\pheanstalk\\classes\\Pheanstalk.php(273): Pheanstalk\\Pheanstalk-&gt;_dispatch(Object(Pheanstalk_Command_PutCommand))\n#3 C:\\wamp\\www\\adam\\phire\\application\\routes.php(45): Pheanstalk\\Pheanstalk-&gt;put('job payload goe...')\n#4 [internal function]: Laravel\\Bundle::{closure}()\n#5 C:\\wamp\\www\\adam\\phire\\laravel\\routing\\route.php(163): call_user_func_array(Object(Closure), Array)\n#6 C:\\wamp\\www\\adam\\phire\\laravel\\routing\\route.php(124): Laravel\\Routing\\Route-&gt;response()\n#7 C:\\wamp\\www\\adam\\phire\\laravel\\laravel.php(167): Laravel\\Routing\\Route-&gt;call()\n#8 C:\\wamp\\www\\adam\\phire\\public\\index.php(34): require('C:\\wamp\\www\\ada...')\n#9 {main}\n<\/code><\/pre>\n<p>Is anyone familiar with Pheanstalk and can provide some assistance?<\/p>\n<p>Thanks Adam.<\/p>\n<ol>\n<li>\n<p>Here is where that exception gets raised. Seems like your beanstalkd is returning something that pheanstalk doesn&#8217;t understand. Are you sure you&#8217;re connecting to a working beanstalkd implementation?<\/p>\n<p>It doesn&#8217;t seem to be an issue with the Pheanstalk Laravel bundle. Have you tried testing with a regular Pheanstalk using the same connection details?<\/p>\n<\/li>\n<\/ol>\n<p id=\"rop\"><small>Originally posted 2013-11-27 12:25:32. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>Ive installed the Pheanstalk bundle for Laravel (https:\/\/github.com\/mikelbring\/Pheanstalk) I am now following the basic example code to try and pass a job to the queue and retrieve it back again. This is my code: Route::get(&#8216;queue&#8217;, function() { Pheanstalk::useTube(&#8216;testtube&#8217;)-&gt;put(&#8220;job payload goes here\\n&#8221;); $pheanstalk = Pheanstalk::connection(); $job = $pheanstalk -&gt;watch(&#8216;testtube&#8217;) -&gt;ignore(&#8216;default&#8217;) -&gt;reserve(); echo $job-&gt;getData(); $pheanstalk-&gt;delete($job); }); Yet [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7,1],"tags":[],"class_list":["post-1658","post","type-post","status-publish","format-standard","hentry","category-laravel","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/1658","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=1658"}],"version-history":[{"count":1,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/1658\/revisions"}],"predecessor-version":[{"id":8847,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/1658\/revisions\/8847"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=1658"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=1658"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=1658"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}