Skip to content

Commit

Permalink
Update interactive_run.py
Browse files Browse the repository at this point in the history
  • Loading branch information
bichengying committed Feb 24, 2021
1 parent 8fa4ae8 commit 85087f9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion bluefog/run/interactive_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,10 @@ def _write_ipengine_pid(profile):

def _get_ipengine_pid_from_file(profile):
path = _get_ip_file_dir(profile)
with open(os.path.join(path, "engine_pids.json"), 'r') as f:
engine_pid_file = os.path.join(path, "engine_pids.json")
if not os.path.exists(engine_pid_file):
return None
with open(engine_pid_file, 'r') as f:
engine_pids = json.load(f)
return engine_pids

Expand Down Expand Up @@ -411,6 +414,7 @@ def handler(signum, frame):
subprocess.run(ipcluster_stop_command, shell=True,
env=env, capture_output=True)
_maybe_kill_ipcontroller_process(args.profile)
_maybe_kill_ipengine_processes(args.profile)
exit(0)

# action of start
Expand Down

0 comments on commit 85087f9

Please sign in to comment.