Kill dashboard and reporter in ray stop. (#4116)

This commit is contained in:
Robert Nishihara 2019-02-23 12:08:39 -08:00 committed by Philipp Moritz
parent ba52caff37
commit 688a0d17e6

View file

@ -440,6 +440,22 @@ def stop():
],
shell=True)
# Find the PID of the Ray reporter process and kill it.
subprocess.call(
[
"kill $(ps aux | grep reporter.py | grep -v grep | "
"awk '{ print $2 }') 2> /dev/null"
],
shell=True)
# Find the PID of the Ray dashboard process and kill it.
subprocess.call(
[
"kill $(ps aux | grep dashboard.py | grep -v grep | "
"awk '{ print $2 }') 2> /dev/null"
],
shell=True)
# Find the PID of the jupyter process and kill it.
try:
from notebook.notebookapp import list_running_servers