문제

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...

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top