Frage

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

War es hilfreich?

Lösung

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.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top