fix: normalize heartbeat targets

This commit is contained in:
Peter Steinberger
2026-01-24 13:17:02 +00:00
parent 9d742ba51f
commit ef7971e3a4
13 changed files with 163 additions and 42 deletions

View File

@@ -1,3 +1,4 @@
import { normalizeAgentId } from "../routing/session-key.js";
import { parseAbsoluteTimeMs } from "./parse.js";
import { migrateLegacyCronPayload } from "./payload-migration.js";
import type { CronJobCreate, CronJobPatch } from "./types.js";
@@ -75,7 +76,7 @@ export function normalizeCronJobInput(
next.agentId = null;
} else if (typeof agentId === "string") {
const trimmed = agentId.trim();
if (trimmed) next.agentId = trimmed;
if (trimmed) next.agentId = normalizeAgentId(trimmed);
else delete next.agentId;
}
}