only run cleanup if we've started ray in local mode and actually started the processes (#228)

This commit is contained in:
Robert Nishihara
2016-07-08 00:14:26 -07:00
committed by Philipp Moritz
parent eee50416a1
commit 875b20e397
3 changed files with 11 additions and 5 deletions
+2 -1
View File
@@ -213,7 +213,8 @@ def connect(scheduler_address, objstore_address, worker_address, is_driver=False
ray.lib.set_log_config(config.get_log_file_path("-".join(["worker", worker_address, "c++"]) + ".log"))
def disconnect(worker=global_worker):
ray.lib.disconnect(worker.handle)
if worker.handle is not None:
ray.lib.disconnect(worker.handle)
def get(objref, worker=global_worker):
"""