Skip to content

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

Open
@jacobtomlinson

Description

@jacobtomlinson

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions