mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-18 07:47:27 +00:00
fix(cron): narrow agentEntry type for heartbeat merge
This commit is contained in:
committed by
Vincent Koc
parent
247ff6ff9e
commit
81d215afa7
@@ -186,12 +186,12 @@ export function buildGatewayCronService(params: {
|
||||
// fully resolved agent heartbeat config so cron-triggered heartbeats
|
||||
// respect agent-specific overrides (agents.list[].heartbeat) before
|
||||
// falling back to agents.defaults.heartbeat.
|
||||
const agentEntry =
|
||||
Array.isArray(runtimeConfig.agents?.list) &&
|
||||
runtimeConfig.agents.list.find(
|
||||
(entry) =>
|
||||
entry && typeof entry.id === "string" && normalizeAgentId(entry.id) === agentId,
|
||||
);
|
||||
const agentEntry = Array.isArray(runtimeConfig.agents?.list)
|
||||
? runtimeConfig.agents.list.find(
|
||||
(entry) =>
|
||||
entry && typeof entry.id === "string" && normalizeAgentId(entry.id) === agentId,
|
||||
)
|
||||
: undefined;
|
||||
const baseHeartbeat = {
|
||||
...runtimeConfig.agents?.defaults?.heartbeat,
|
||||
...agentEntry?.heartbeat,
|
||||
|
||||
Reference in New Issue
Block a user