From 66b248db7738646d600213a815096786343bcc35 Mon Sep 17 00:00:00 2001 From: fit2bot <68588906+fit2bot@users.noreply.github.com> Date: Mon, 13 Feb 2023 17:11:43 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E5=8E=BB=E9=99=A4=20applet=20=E8=84=9A?= =?UTF-8?q?=E6=9C=AC=E7=9A=84=E9=80=80=E5=87=BA=E5=BC=B9=E7=AA=97=20(#9525?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Eric --- apps/terminal/applets/chrome/common.py | 6 +++--- apps/terminal/applets/navicat/common.py | 9 +++------ 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/apps/terminal/applets/chrome/common.py b/apps/terminal/applets/chrome/common.py index 3c527f615..06d23f9fd 100644 --- a/apps/terminal/applets/chrome/common.py +++ b/apps/terminal/applets/chrome/common.py @@ -59,12 +59,12 @@ def check_pid_alive(pid) -> bool: content = decode_content(csv_ret) content_list = content.strip().split("\r\n") if len(content_list) != 2: - notify_err_message(content) + print("check pid {} ret invalid: {}".format(pid, content)) return False ret_pid = content_list[1].split(",")[1].strip('"') return str(pid) == ret_pid except Exception as e: - notify_err_message(e) + print("check pid {} err: {}".format(pid, e)) return False @@ -73,7 +73,7 @@ def wait_pid(pid): time.sleep(5) ok = check_pid_alive(pid) if not ok: - notify_err_message("程序退出") + print("pid {} is not alive".format(pid)) break diff --git a/apps/terminal/applets/navicat/common.py b/apps/terminal/applets/navicat/common.py index 1802c8d86..010347fe0 100644 --- a/apps/terminal/applets/navicat/common.py +++ b/apps/terminal/applets/navicat/common.py @@ -59,14 +59,12 @@ def check_pid_alive(pid) -> bool: content = decode_content(csv_ret) content_list = content.strip().split("\r\n") if len(content_list) != 2: - notify_err_message(content) - time.sleep(2) + print("check pid {} ret invalid: {}".format(pid, content)) return False ret_pid = content_list[1].split(",")[1].strip('"') return str(pid) == ret_pid except Exception as e: - notify_err_message(e) - time.sleep(2) + print("check pid {} err: {}".format(pid, e)) return False @@ -75,8 +73,7 @@ def wait_pid(pid): time.sleep(5) ok = check_pid_alive(pid) if not ok: - notify_err_message("程序退出") - time.sleep(2) + print("pid {} is not alive".format(pid)) break