mirror of
https://github.com/fosrl/pangolin.git
synced 2026-05-07 21:30:36 -05:00
Properly resolve import issues
This commit is contained in:
@@ -9,7 +9,7 @@ export async function fireHealthCheckHealthyAlert(
|
||||
return;
|
||||
}
|
||||
|
||||
export async function fireHealthCheckUnealthyAlert(
|
||||
export async function fireHealthCheckUnhealthyAlert(
|
||||
orgId: string,
|
||||
healthCheckId: number,
|
||||
healthCheckName?: string,
|
||||
|
||||
20
server/lib/alerts/events/resourceEvents.ts
Normal file
20
server/lib/alerts/events/resourceEvents.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
export async function fireResourceHealthyAlert(
|
||||
orgId: string,
|
||||
resourceId: number,
|
||||
resourceName?: string | null,
|
||||
extra?: Record<string, unknown>
|
||||
): Promise<void> {}
|
||||
|
||||
export async function fireResourceUnhealthyAlert(
|
||||
orgId: string,
|
||||
resourceId: number,
|
||||
resourceName?: string | null,
|
||||
extra?: Record<string, unknown>
|
||||
): Promise<void> {}
|
||||
|
||||
export async function fireResourceToggleAlert(
|
||||
orgId: string,
|
||||
resourceId: number,
|
||||
resourceName?: string | null,
|
||||
extra?: Record<string, unknown>
|
||||
): Promise<void> {}
|
||||
@@ -1,2 +1,3 @@
|
||||
export * from "./events/siteEvents";
|
||||
export * from "./events/healthCheckEvents";
|
||||
export * from "./events/resourceEvents";
|
||||
|
||||
@@ -16,4 +16,5 @@ export * from "./processAlerts";
|
||||
export * from "./sendAlertWebhook";
|
||||
export * from "./sendAlertEmail";
|
||||
export * from "./events/siteEvents";
|
||||
export * from "./events/healthCheckEvents";
|
||||
export * from "./events/healthCheckEvents";
|
||||
export * from "./events/resourceEvents";
|
||||
|
||||
@@ -14,7 +14,10 @@ import {
|
||||
fireHealthCheckHealthyAlert,
|
||||
fireHealthCheckUnhealthyAlert
|
||||
} from "#dynamic/lib/alerts";
|
||||
import { fireResourceHealthyAlert, fireResourceUnhealthyAlert } from "@server/private/lib/alerts/events/resourceEvents";
|
||||
import {
|
||||
fireResourceHealthyAlert,
|
||||
fireResourceUnhealthyAlert
|
||||
} from "#dynamic/lib/alerts";
|
||||
|
||||
interface TargetHealthStatus {
|
||||
status: string;
|
||||
@@ -223,13 +226,13 @@ export const handleHealthcheckStatusMessage: MessageHandler = async (
|
||||
await fireHealthCheckUnhealthyAlert(
|
||||
orgId,
|
||||
targetCheck.targetHealthCheckId,
|
||||
targetCheck.name
|
||||
targetCheck.name ?? undefined
|
||||
);
|
||||
} else if (healthStatus.status === "healthy") {
|
||||
await fireHealthCheckHealthyAlert(
|
||||
orgId,
|
||||
targetCheck.targetHealthCheckId,
|
||||
targetCheck.name
|
||||
targetCheck.name ?? undefined
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user