[claude] Phase 2: move portal health probe to data/loaders (#411) (#462)
Some checks failed
Deploy Nexus / deploy (push) Failing after 7s
Staging Smoke Test / smoke-test (push) Failing after 1s

This commit was merged in pull request #462.
This commit is contained in:
2026-03-24 22:12:22 +00:00
parent c0a673038b
commit 6db2871785
2 changed files with 21 additions and 15 deletions

View File

@@ -18,6 +18,25 @@ export async function fetchSoulMd() {
}
}
// --- Portal health probes ---
export async function checkPortalHealth(portals) {
for (const portal of portals) {
if (!portal.destination?.url) {
portal.status = 'offline';
continue;
}
try {
await fetch(portal.destination.url, {
mode: 'no-cors',
signal: AbortSignal.timeout(5000),
});
portal.status = 'online';
} catch {
portal.status = 'offline';
}
}
}
// --- portals.json ---
export async function fetchPortals() {
const res = await fetch('./portals.json');