Open ifohancroft opened 2 years ago
Here is the source code for this method: https://github.com/php/pecl-networking-gearman/blob/7da13e4babc17067b2b45d6b37041c3c8ed91637/php_gearman_worker.c#L627
It will return false
if return code is not GEARMAN_SUCCESS
.
Here is the source code for this method:
It will return
false
if return code is notGEARMAN_SUCCESS
.
Thank you! The return code of what though?
The return code of what though?
The C function gearman_worker_work
in libgearman.
See https://github.com/gearman/gearmand/blob/302f33cebf730a9f7356ccdcc4cb8b4c171bd68a/docs/source/libgearman/gearman_return_t.rst for a list of possible errors.
The return code of what though?
The C function
gearman_worker_work
in libgearman.
I get that, but I am asking on a higher level. What has to happen for $worker->work to return false/what controls what GEARMAN_STATUS would $worker->returnCode() return and in what cases it won't be GEARMAN_SUCCESS?
I have looked everywhere (even tried reading the C source but that didn't help) but I can't find the answer to that.
When will GearmanWorker::work be false? What can/will cause it to "fail" basically? The PHP manual over at php.net says:
If the return code of what is not one of GEARMAN_SUCCESS, GEARMAN_IO_WAIT or GEARMAN_WORK_FAIL?
Is there a way to see the Gearman Worker class as a PHP code? I.e. as if it was a class written in PHP?