Optimized code in hot paths with z-ai/glm5

This commit is contained in:
Alishahryar1
2026-02-14 19:59:46 -08:00
parent 952a2351ec
commit 7259b1def8
12 changed files with 150 additions and 81 deletions
+5
View File
@@ -145,6 +145,11 @@ async def lifespan(app: FastAPI):
yield
# Cleanup
if message_handler and hasattr(message_handler, "session_store"):
try:
message_handler.session_store.flush_pending_save()
except Exception as e:
logger.warning(f"Session store flush on shutdown: {e}")
logger.info("Shutdown requested, cleaning up...")
if messaging_platform:
await _best_effort("messaging_platform.stop", messaging_platform.stop())