Skip to content

Commit a15abb4

Browse files
committed
Merge branch '3.5.x'
2 parents 8e84e67 + 348fdc1 commit a15abb4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

framework/fit/python/plugin/fit_py_heart_beat_agent/heart_beat_agent.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ def _heart_beat_task(queue: multiprocessing.Queue):
115115
sys_plugin_logger.info("heart beat task will terminated gracefully.")
116116
break
117117
except Empty:
118-
if platform.system() != 'Windows' and not multiprocessing.parent_process().is_alive():
118+
if platform.system() not in ('Windows', 'Darwin') and not multiprocessing.parent_process().is_alive():
119119
sys_plugin_logger.info("heart beat task will terminated due to parent process died.")
120120
break
121121
_try_heart_beat_once()
@@ -135,7 +135,7 @@ def _heart_beat_monitor(heart_beat_background_job):
135135
def online() -> None:
136136
""" Runtime向心跳代理申请启动本地心跳服务,心跳代理周期性触发heartbeat() """
137137
sys_plugin_logger.info(f"start heart beating with interval {_interval()} ms, alive time {_alive_time()} ms.")
138-
if platform.system() == 'Windows':
138+
if platform.system() in ('Windows', 'Darwin'):
139139
heart_beat_background_job = Thread(target=_heart_beat_task, args=(_HEART_BEAT_FINISH_QUEUE,),
140140
name='HeartBeatThread')
141141
else:

0 commit comments

Comments
 (0)