Await Workers
Waits for workers to either reach the running status, or to complete and exit.
- Syntax
-
await_workers(ids, wait_for_completion=True, timeout_seconds=60) - Parameters
-
-
ids: int or list of worker descriptions, optional The id's of the worker engines to stop or the worker's description dicts as returned bylaunch_workersorlist_workers. If not provided, all workers in the cluster will be stopped. -
wait_for_completion: boolean, optional If True, will wait for all workers to exit successfully. If False, will wait for all workers to reach therunningstatus. Defaults to True. -
timeout_seconds: int, optional Maximum number of seconds to wait for workers to reach the desired status. Defaults to 60. If equal to 0, there is no timeout. Workers that have not reached the desired status by the timeout will be returned in thefailureskey. See the return value documentation.
-
- Returns
-
-
dict- A dict with keysworkersandfailures. Theworkerskey contains a list of dicts describing the workers that reached the desired status. Thefailureskey contains a list of descriptions of the workers that did not.
-
