Question

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

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top