Allow client wait_for_workers to wait for an absolute number of workers
Open
- Dominant language
- Python
- Stars
- 1.7k
- Forks
- 778
- Avg merge
- 2h 50m
- Merged PRs (30d)
- 3
Description
Currently `Client.wait_for_workers` waits until the cluster has at least the number specified. So if you have three or more workers and call `client.wait_for_workers(3)` it will continue.
There are scenarios where you may want to wait for an absolute number of workers, for example when scaling down. It would be great to allow `wait_for_workers` to handle this too.
One solution could be to introduce an `absolute` keyword that defaults to `False`.
```python
client.wait_for_workers(7) # Waits for at least 7 workers
client.wait_for_workers(7, absolute=True) # Waits for exactly 7 workers
```
Contributor guide
Assessment
This issue has not been assessed yet.