Skip to content

Commit f35968f

Browse files
committed
chore: remove cron health check, Sentry covers all 5xx alerting
1 parent 46a9c7c commit f35968f

3 files changed

Lines changed: 0 additions & 100 deletions

File tree

src/hooks.server.ts

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import type { Handle, HandleServerError } from '@sveltejs/kit';
2-
import { runHealthChecks } from '$lib/server/monitor';
32

43
// Parse DSN into the store endpoint and auth header Sentry expects.
54
// DSN format: https://<key>@<host>/<project_id>
@@ -199,24 +198,4 @@ export const handle: Handle = async ({ event, resolve }) => {
199198
return securedResponse;
200199
};
201200

202-
// Cloudflare Workers Cron Trigger — runs on the schedule defined in wrangler.toml.
203-
// Checks critical production signals and sends an alert to ALERT_WEBHOOK_URL if any fail.
204-
export const scheduled: App.Scheduled = async ({ platform }) => {
205-
const dsn = platform?.env?.SENTRY_DSN;
206-
try {
207-
await runHealthChecks({
208-
APP_URL: platform?.env?.APP_URL ?? 'https://openboot.dev',
209-
});
210-
} catch (err) {
211-
console.error('[monitor] cron failed:', err);
212-
if (dsn) {
213-
await captureToSentry(dsn, {
214-
level: 'error',
215-
exception: {
216-
values: [{ type: 'HealthCheckError', value: err instanceof Error ? err.message : String(err) }],
217-
},
218-
});
219-
}
220-
}
221-
};
222201

src/lib/server/monitor.ts

Lines changed: 0 additions & 75 deletions
This file was deleted.

wrangler.toml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,3 @@ migrations_dir = "migrations"
1919

2020
[vars]
2121
APP_URL = "https://openboot.dev"
22-
# ALERT_WEBHOOK_URL = "https://discord.com/api/webhooks/..." # set in Cloudflare dashboard (secret)
23-
24-
[triggers]
25-
crons = ["0 * * * *"] # every hour

0 commit comments

Comments
 (0)