This commit is contained in:
@@ -137,6 +137,18 @@ def run_cleanup_agent_context():
|
||||
logger.info("[Cleanup] agent_context TTL 清理完成")
|
||||
except Exception as e:
|
||||
logger.error(f"[Cleanup] agent_context 清理失敗: {e}")
|
||||
try:
|
||||
from services.event_router import notify_failure
|
||||
notify_failure(
|
||||
task_name="run_cleanup_agent_context",
|
||||
error=e,
|
||||
source="Scheduler.Cleanup",
|
||||
event_type="agent_context_cleanup_failure",
|
||||
priority="P2",
|
||||
title="agent_context TTL 清理失敗",
|
||||
)
|
||||
except Exception as _router_e:
|
||||
logger.error(f"[Cleanup] event_router 失敗: {_router_e}")
|
||||
finally:
|
||||
session.close()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user