fix(cookbook): preserve scheduled serve server metadata (#4545)

Co-authored-by: Cata <cata@bigjohn.local>
This commit is contained in:
Catalin Iliescu
2026-06-27 18:48:53 +03:00
committed by GitHub
parent 95b3c8139d
commit 497c391f84
2 changed files with 76 additions and 2 deletions
+4 -2
View File
@@ -2175,6 +2175,8 @@ async def action_cookbook_serve(
)
if existing is None:
display_name = repo_id.split("/")[-1] if "/" in repo_id else repo_id
ssh_port = str(srv.get("port") or cfg.get("ssh_port") or "")
platform = str(srv.get("platform") or cfg.get("platform") or "linux")
placeholder = (
f"Launched by scheduled task {task_name!r} — waiting for tmux output…\n"
f" session: {sid}\n"
@@ -2192,8 +2194,8 @@ async def action_cookbook_serve(
"ts": int(_time.time() * 1000),
"payload": {"repo_id": repo_id, "remote_host": host or "", "_cmd": cmd},
"remoteHost": host or "",
"sshPort": "",
"platform": "linux",
"sshPort": ssh_port or "",
"platform": platform or "linux",
"_serveReady": False,
"_endpointAdded": False,
}