Comment 2 for bug 1007322

Revision history for this message
Darren (darren-hoo) wrote :

Hi Eric,

The first case is what my situation is, but to put it more elaborately, it goes like this:

1. Job is assigned to the worker

2. Worker starts the execution of the job

3. Calling worker.stop() before executeFunction returns the GearmanJobResult

4. executeFunction returns successfully.

from the point of view of the API user, worker.stop() is different from worker.shutdown()
in that stop() only issues a shutdown request, not actually shutdown a worker abruptly , i.e.
the working loop should continue and make sure that a full worker cycle be executed,
it should wait for a job to complete fully after its execution even worker.stop() has been called.