fix: harden cron session automation flows

This commit is contained in:
chengyongru committed 2026-06-12 18:13:25 +08:00
1 parent b5f9d51b5b
commit a50b3ac0f2
30 files changed
+267 -56

No files matched your search

+5 -1
View File
@@ -4,7 +4,7 @@ from __future__ import annotations
from dataclasses import dataclass
from pathlib import Path
from typing import Any
from typing import Any, Callable
from loguru import logger as default_logger
@@ -26,6 +26,7 @@ class GatewayServices:
workspaces: WebUIWorkspaceController
session_manager: Any | None
cron_service: Any | None
cron_pending_job_ids: Callable[[str], set[str]] | None
def build_gateway_services(
@@ -41,6 +42,7 @@ def build_gateway_services(
runtime_capabilities_overrides: dict[str, Any] | None,
disabled_skills: set[str] | None = None,
cron_service: Any | None = None,
cron_pending_job_ids: Callable[[str], set[str]] | None = None,
logger: Any = default_logger,
) -> GatewayServices:
tokens = GatewayTokenStore()
@@ -68,6 +70,7 @@ def build_gateway_services(
skills_workspace_path=workspace_path,
disabled_skills=disabled_skills,
cron_service=cron_service,
cron_pending_job_ids=cron_pending_job_ids,
log=logger,
)
return GatewayServices(
@@ -78,4 +81,5 @@ def build_gateway_services(
workspaces=workspaces,
session_manager=session_manager,
cron_service=cron_service,
cron_pending_job_ids=cron_pending_job_ids,
)