Skip to content
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

top-level Client function to shutdown workers #600

Closed
jreback opened this issue Oct 20, 2016 · 6 comments
Closed

top-level Client function to shutdown workers #600

jreback opened this issue Oct 20, 2016 · 6 comments
Labels
needs info Needs further information from the user

Comments

@jreback
Copy link
Contributor

jreback commented Oct 20, 2016

If I have remotely launched workers with a nanny process I can simply use client.restart() to dump the cluster. However a Worker (say launched via a resource manager or some such), can right now be cleanly terminated via:

from distributed.utils import sync
sync(client.loop, client.scheduler.broadcast, msg={'op': 'terminate'})

Client.shutdown() does not do this (despite it seems that the doc-string indicates it.

So maybe add a method

Client.shutdown_workers()?

@adamklein
Copy link
Contributor

+1. I'd like to cleanly shutdown my cluster so the Nanny process doesn't respawn the worker.

@adamklein
Copy link
Contributor

Also, can't seem to close scheduler so it exits the CLI-launched scheduler gracefully. I tried

        sync(client.loop, client.scheduler.terminate, fast=False)

Which seems to close things, but the process hangs around.

@adamklein
Copy link
Contributor

@mrocklin Confirming there's still no way to do this except

sync(client.loop, client.scheduler.broadcast, msg={'op': 'terminate'}, nanny=True)

?

@mrocklin
Copy link
Member

mrocklin commented Apr 2, 2018

Ah no, this might suffice: #1876

@GenevieveBuckley
Copy link
Contributor

@adamklein does the retire_workers functionality added in #1876 solve your issue?

@GenevieveBuckley GenevieveBuckley added the needs info Needs further information from the user label Oct 15, 2021
@jrbourbeau
Copy link
Member

Closing due to lack of activity. Feel free to re-open if folks would like to continue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs info Needs further information from the user
Projects
None yet
Development

No branches or pull requests

5 participants