Kill jupyter in ray stop. (#689)

* Kill jupyter in ray stop.

* Terminate jupyter notebook in ray stop.

* Fix linting.
This commit is contained in:
Robert Nishihara
2017-06-20 22:58:34 -07:00
committed by Philipp Moritz
parent 5bb07cb01b
commit 2d636d9278
+15 -10
View File
@@ -159,19 +159,24 @@ def stop():
"local_scheduler"], shell=True)
# Find the PID of the monitor process and kill it.
subprocess.call(["kill $(ps aux | grep monitor.py | awk '{ print $2 }') "
"2> /dev/null"], shell=True)
# Find the PID of the Redis process and kill it.
subprocess.call(["kill $(ps aux | grep redis-server | awk '{ print $2 }') "
"2> /dev/null"], shell=True)
# Find the PIDs of the worker processes and kill them.
subprocess.call(["kill $(ps aux | grep default_worker.py | "
subprocess.call(["kill $(ps aux | grep monitor.py | grep -v grep | "
"awk '{ print $2 }') 2> /dev/null"], shell=True)
# Find the PID of the Redis process and kill it.
subprocess.call(["kill $(ps aux | grep redis-server | grep -v grep | "
"awk '{ print $2 }') 2> /dev/null"], shell=True)
# Find the PIDs of the worker processes and kill them.
subprocess.call(["kill -9 $(ps aux | grep default_worker.py | "
"grep -v grep | awk '{ print $2 }') 2> /dev/null"],
shell=True)
# Find the PID of the Ray log monitor process and kill it.
subprocess.call(["kill $(ps aux | grep log_monitor.py | "
subprocess.call(["kill $(ps aux | grep log_monitor.py | grep -v grep | "
"awk '{ print $2 }') 2> /dev/null"], shell=True)
# Find the PID of the jupyter process and kill it.
subprocess.call(["kill $(ps aux | grep jupyter | grep -v grep | "
"awk '{ print $2 }') 2> /dev/null"], shell=True)