未验证 提交 394e4849 编写于 作者: 走神的阿圆's avatar 走神的阿圆 提交者: GitHub

fix ProcessLookupError while stoping serving

上级 f67ad5be
......@@ -116,7 +116,10 @@ class ServingCommand:
if platform.system() == "Windows":
os.kill(pid, signal.SIGTERM)
else:
os.killpg(pid, signal.SIGTERM)
try:
os.killpg(pid, signal.SIGTERM)
except ProcessLookupError:
os.kill(pid, signal.SIGTERM)
@staticmethod
def start_bert_serving(args):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册