Allow shutdown when no engines are registered #2769

Merged
merged 2 commits into from Jan 10, 2013

Projects

None yet

2 participants

@dhirschfeld

When no engines are registered the Client.shutdown method raises a NoEnginesRegistered exception.
This occurs before the hub shutdown thus preventing the hub from being shutdown.

David Hirsch... added some commits Jan 10, 2013
@dhirschfeld

The following code demonstrates the problem:

from IPython.utils.path import locate_profile
from IPython.parallel.apps.launcher import LocalControllerLauncher
from IPython.parallel import Client
controller = LocalControllerLauncher(profile_dir=locate_profile())
controller.start()
try:
    rc = Client()
    rc.shutdown()
    rc.shutdown(hub=True)
finally:
    controller.stop()
#
@minrk
Member
minrk commented Jan 10, 2013

Looks clear and right to me.

@minrk minrk merged commit 821187b into ipython:master Jan 10, 2013
@dhirschfeld dhirschfeld deleted the dhirschfeld:clean-shutdown2 branch Jan 10, 2013
@minrk minrk added a commit that referenced this pull request Mar 5, 2013
@minrk minrk Backport PR #2769: Allow shutdown when no engines are registered
When no engines are registered the `Client.shutdown` method raises a `NoEnginesRegistered` exception.
This occurs before the hub shutdown thus preventing the hub from being shutdown.
6a5646e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment