feat(heartbeat): change default target to 'last' and remove target option from UI
This commit is contained in:
@@ -235,10 +235,7 @@ def _update_agent_heartbeat(
|
||||
if isinstance(raw, dict):
|
||||
heartbeat.update(raw)
|
||||
heartbeat["every"] = payload.every
|
||||
if payload.target is not None:
|
||||
heartbeat["target"] = payload.target
|
||||
elif "target" not in heartbeat:
|
||||
heartbeat["target"] = DEFAULT_HEARTBEAT_CONFIG.get("target", "none")
|
||||
heartbeat["target"] = DEFAULT_HEARTBEAT_CONFIG.get("target", "last")
|
||||
agent.heartbeat_config = heartbeat
|
||||
agent.updated_at = utcnow()
|
||||
|
||||
|
||||
@@ -16,8 +16,6 @@ class BoardGroupHeartbeatApply(SQLModel):
|
||||
# Heartbeat cadence string understood by the OpenClaw gateway
|
||||
# (e.g. "2m", "10m", "30m").
|
||||
every: str
|
||||
# Optional heartbeat target (most deployments use "none").
|
||||
target: str | None = None
|
||||
include_board_leads: bool = False
|
||||
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ _GATEWAY_AGENT_SUFFIX = ":main"
|
||||
|
||||
DEFAULT_HEARTBEAT_CONFIG: dict[str, Any] = {
|
||||
"every": "10m",
|
||||
"target": "none",
|
||||
"target": "last",
|
||||
"includeReasoning": False,
|
||||
}
|
||||
|
||||
|
||||
@@ -307,7 +307,7 @@ async def test_control_plane_upsert_agent_create_then_update(monkeypatch):
|
||||
agent_id="board-agent-a",
|
||||
name="Board Agent A",
|
||||
workspace_path="/tmp/workspace-board-agent-a",
|
||||
heartbeat={"every": "10m", "target": "none", "includeReasoning": False},
|
||||
heartbeat={"every": "10m", "target": "last", "includeReasoning": False},
|
||||
),
|
||||
)
|
||||
|
||||
@@ -341,7 +341,7 @@ async def test_control_plane_upsert_agent_handles_already_exists(monkeypatch):
|
||||
agent_id="board-agent-a",
|
||||
name="Board Agent A",
|
||||
workspace_path="/tmp/workspace-board-agent-a",
|
||||
heartbeat={"every": "10m", "target": "none", "includeReasoning": False},
|
||||
heartbeat={"every": "10m", "target": "last", "includeReasoning": False},
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user