Skip to content

Allow client wait_for_workers to wait for an absolute number of workers #6374

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
jacobtomlinson opened this issue May 19, 2022 · 0 comments · May be fixed by #6377
Open

Allow client wait_for_workers to wait for an absolute number of workers #6374

jacobtomlinson opened this issue May 19, 2022 · 0 comments · May be fixed by #6377

Comments

@jacobtomlinson
Copy link
Member

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.

client.wait_for_workers(7)  # Waits for at least 7 workers

client.wait_for_workers(7, absolute=True)  # Waits for exactly 7 workers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant