Fix site offline not respecting hc enabled

This commit is contained in:
Owen
2026-04-27 15:17:12 -07:00
parent b88469f901
commit 3439a3690f
2 changed files with 21 additions and 11 deletions

View File

@@ -112,7 +112,8 @@ export async function fireSiteOfflineAlert(
.where(
and(
eq(targetHealthCheck.orgId, orgId),
eq(targetHealthCheck.siteId, siteId)
eq(targetHealthCheck.siteId, siteId),
eq(targetHealthCheck.hcEnabled, true) // only effect the ones that are enabled
)
)
.returning();
@@ -126,7 +127,7 @@ export async function fireSiteOfflineAlert(
healthCheck.orgId,
healthCheck.targetHealthCheckId,
healthCheck.name,
undefined,
healthCheck.targetId, // for the resource if we have one
undefined,
true,
trx