From f09c2c528627034135c7df4117ebab1a258f1079 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=AD=E6=BD=87?= <1576730710@qq.com> Date: Wed, 23 Jul 2025 17:26:40 +0800 Subject: [PATCH] [python] Register fitable to the registration center during heartbeat --- .../plugin/fit_py_heart_beat_agent/heart_beat_agent.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/framework/fit/python/plugin/fit_py_heart_beat_agent/heart_beat_agent.py b/framework/fit/python/plugin/fit_py_heart_beat_agent/heart_beat_agent.py index a58a7ca3..e57c3dc2 100644 --- a/framework/fit/python/plugin/fit_py_heart_beat_agent/heart_beat_agent.py +++ b/framework/fit/python/plugin/fit_py_heart_beat_agent/heart_beat_agent.py @@ -94,9 +94,10 @@ def _try_heart_beat_once(): f"heart_beat_gap={'{:.3f}'.format(heart_beat_gap)}s, " f"heart_beat_interval={'{:.3f}'.format(_interval() / 1000)}s]") if _FAIL_COUNT != 0: - _registry_fitable_addresses() sys_plugin_logger.info(f"heart beat reconnect success. [fail_count={_FAIL_COUNT}]") _FAIL_COUNT = 0 + # 当前的优化仅为临时优化,待 Nacos 版注册中心上线后,更新并验证 + _registry_fitable_addresses() sys_plugin_logger.debug(f'heart beating success.') _LAST_HEART_BEAT_SUCCESS_TIME = heart_beat_finish_time except: @@ -169,7 +170,7 @@ def _registry_fitable_addresses(): """ try: register_all_fit_services() - sys_plugin_logger.info("In heart beat agent registry all fitable address success.") + sys_plugin_logger.debug("In heart beat agent registry all fitable address success.") except: sys_plugin_logger.warning(f"In heart beat agent registry all fitable address failed.") except_type, except_value, except_traceback = sys.exc_info()