Reflect IM channel runtime health

This commit is contained in:
taohe
2026-06-11 17:11:55 +08:00
parent dae7c7870e
commit b26b30ac3d
4 changed files with 81 additions and 0 deletions
+7
View File
@@ -88,6 +88,12 @@ class FeishuChannel(Channel):
def supports_streaming(self) -> bool:
return True
@property
def is_running(self) -> bool:
if not self._running:
return False
return self._thread is not None and self._thread.is_alive()
async def start(self) -> None:
if self._running:
return
@@ -193,6 +199,7 @@ class FeishuChannel(Channel):
except Exception:
if self._running:
logger.exception("Feishu WebSocket error")
self._running = False
async def stop(self) -> None:
self._running = False