From f3f0c24e167d1083af5dd357ffcc1003868eb624 Mon Sep 17 00:00:00 2001 From: hrz <1710360675@qq.com> Date: Mon, 1 Dec 2025 16:38:10 +0800 Subject: [PATCH] =?UTF-8?q?update:=E5=87=8F=E5=B0=91=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E4=BA=A7=E7=94=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main/xiaozhi-server/core/utils/gc_manager.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main/xiaozhi-server/core/utils/gc_manager.py b/main/xiaozhi-server/core/utils/gc_manager.py index 41d442b7..e3b958fe 100644 --- a/main/xiaozhi-server/core/utils/gc_manager.py +++ b/main/xiaozhi-server/core/utils/gc_manager.py @@ -2,6 +2,7 @@ 全局GC管理模块 定期执行垃圾回收,避免频繁触发GC导致的GIL锁问题 """ + import gc import asyncio import threading @@ -60,8 +61,7 @@ class GlobalGCManager: # 等待指定间隔 try: await asyncio.wait_for( - self._stop_event.wait(), - timeout=self.interval_seconds + self._stop_event.wait(), timeout=self.interval_seconds ) # 如果stop_event被设置,退出循环 break @@ -94,7 +94,7 @@ class GlobalGCManager: return before, collected, after before, collected, after = await loop.run_in_executor(None, do_gc) - logger.bind(tag=TAG).info( + logger.bind(tag=TAG).debug( f"全局GC执行完成 - 回收对象: {collected}, " f"对象数量: {before} -> {after}" )