note 105443 added to gearmanclient.setcompletecallback
| From: | JustasButkus at osu1 dot php dot net | Date: | Thu, 18 Aug 2011 13:59:06 +0000 |
| Subject: | note 105443 added to gearmanclient.setcompletecallback | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-182559@lists.php.net to get a copy of this message | ||
One shall note, that callback function MUST either return a valid Gearman status code, or return
nothing (do not return).
I.e. these are valid complete callbacks:
<?php
function goodCallbackOne(GearmanTask $task)
{
print_r($task);
}
?>
<?php
function goodCallbackTwo(GearmanTask $task)
{
print_r($task);
return GEARMAN_SUCCESS;
}
?>
While following is NOT, unless you want your client code to fail with Gearman error 'german
wait:no active file descriptors':
<?php
function badCallbackTwo(GearmanTask $task)
{
print_r($task);
return true;
}
?>
----
Server IP: 193.219.81.76
Probable Submitter: 88.119.144.107
----
Manual Page -- http://www.php.net/manual/en/gearmanclient.setcompletecallback.php
Edit -- https://master.php.net/note/edit/105443
Del: integrated -- https://master.php.net/note/delete/105443/integrated
Del: useless -- https://master.php.net/note/delete/105443/useless
Del: bad code -- https://master.php.net/note/delete/105443/bad+code
Del: spam -- https://master.php.net/note/delete/105443/spam
Del: non-english -- https://master.php.net/note/delete/105443/non-english
Del: in docs -- https://master.php.net/note/delete/105443/in+docs
Del: other reasons-- https://master.php.net/note/delete/105443
Reject -- https://master.php.net/note/reject/105443
Search -- https://master.php.net/manage/user-notes.php