Ah, addTask
is synchronous so I don't need to do any polling, runTasks
returns true once all have been completed so there's my answer.
Gearman Task Completion Callback
문제
It's possible to set a callback when a single task has finished with setCompleteCallback()
- is it possible to set a callback when an entire batch of tasks has completed (when run in parallel), for example if you use runTasks()
as follows:
$client->addTask($method1, $data);
$client->addTask($method2, $data);
$client->runTasks();
I need to know when both tasks have been completed in order to close the job...
해결책
제휴하지 않습니다 StackOverflow