From 758d6ae81ba67690c84c059f88c0e942940f636e Mon Sep 17 00:00:00 2001 From: fit2bot <68588906+fit2bot@users.noreply.github.com> Date: Wed, 1 Feb 2023 19:02:41 +0800 Subject: [PATCH] perf: gateway print (#9398) Co-authored-by: feng <1304903146@qq.com> --- apps/assets/automations/ping_gateway/manager.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/assets/automations/ping_gateway/manager.py b/apps/assets/automations/ping_gateway/manager.py index 858717665..d03e5d22d 100644 --- a/apps/assets/automations/ping_gateway/manager.py +++ b/apps/assets/automations/ping_gateway/manager.py @@ -33,7 +33,7 @@ class PingGatewayManager: err = _('No account') return False, err - logger.debug('Test account: {}'.format(account)) + print('Test account: {}'.format(account)) try: proxy.connect( gateway.address, @@ -91,7 +91,7 @@ class PingGatewayManager: @staticmethod def on_host_success(gateway, account): - logger.info('\033[32m {} -> {}\033[0m\n'.format(gateway, account)) + print('\033[32m {} -> {}\033[0m\n'.format(gateway, account)) gateway.set_connectivity(Connectivity.OK) if not account: return @@ -99,7 +99,7 @@ class PingGatewayManager: @staticmethod def on_host_error(gateway, account, error): - logger.info('\033[31m {} -> {} 原因: {} \033[0m\n'.format(gateway, account, error)) + print('\033[31m {} -> {} 原因: {} \033[0m\n'.format(gateway, account, error)) gateway.set_connectivity(Connectivity.ERR) if not account: return @@ -107,7 +107,7 @@ class PingGatewayManager: @staticmethod def before_runner_start(): - logger.info(">>> 开始执行测试网关可连接性任务") + print(">>> 开始执行测试网关可连接性任务") def get_accounts(self, gateway): account = gateway.select_account