From edebb2ca8fbdb165aa404b2e5f48a38bd6d6db94 Mon Sep 17 00:00:00 2001 From: felixhjh <852142024@qq.com> Date: Thu, 11 Nov 2021 07:07:49 +0000 Subject: [PATCH] change pid recording to record gid --- python/paddle_serving_server/util.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/paddle_serving_server/util.py b/python/paddle_serving_server/util.py index 8f0d610a..85c9341c 100644 --- a/python/paddle_serving_server/util.py +++ b/python/paddle_serving_server/util.py @@ -91,6 +91,7 @@ def dump_pid_file(portList, model): dump_pid_file([9494, 10082], 'serve') ''' pid = os.getpid() + gid = os.getpgid(pid) pidInfoList = [] filepath = os.path.join(CONF_HOME, "ProcessInfo.json") if os.path.exists(filepath): @@ -105,7 +106,7 @@ def dump_pid_file(portList, model): pidInfoList.remove(info) with open(filepath, "w") as fp: - info ={"pid": pid, "port" : portList, "model" : str(model), "start_time" : time.time()} + info ={"pid": gid, "port" : portList, "model" : str(model), "start_time" : time.time()} pidInfoList.append(info) json.dump(pidInfoList, fp) -- GitLab