diff --git a/apps/web/src/app/api/checker/cron/10m/route.ts b/apps/web/src/app/api/checker/cron/10m/route.ts index 09222f99b3..f01fab97c1 100644 --- a/apps/web/src/app/api/checker/cron/10m/route.ts +++ b/apps/web/src/app/api/checker/cron/10m/route.ts @@ -14,7 +14,7 @@ export async function GET(req: NextRequest) { if (isAuthorizedDomain(req.url)) { const { cronCompleted, cronFailed } = runSentryCron("10-m-cron"); try { - await cron({ periodicity: "10m", req }); + await cron({ periodicity: "10m" }); await cronCompleted(); } catch (_error) { await cronFailed(); diff --git a/apps/web/src/app/api/checker/cron/1h/route.ts b/apps/web/src/app/api/checker/cron/1h/route.ts index f470d2d715..6268ba68c8 100644 --- a/apps/web/src/app/api/checker/cron/1h/route.ts +++ b/apps/web/src/app/api/checker/cron/1h/route.ts @@ -14,7 +14,7 @@ export async function GET(req: NextRequest) { if (isAuthorizedDomain(req.url)) { const { cronCompleted, cronFailed } = runSentryCron("1-h-cron"); try { - await cron({ periodicity: "1h", req }); + await cron({ periodicity: "1h" }); await cronCompleted(); } catch (_error) { await cronFailed(); diff --git a/apps/web/src/app/api/checker/cron/1m/route.ts b/apps/web/src/app/api/checker/cron/1m/route.ts index 017973c591..9987de238f 100644 --- a/apps/web/src/app/api/checker/cron/1m/route.ts +++ b/apps/web/src/app/api/checker/cron/1m/route.ts @@ -14,7 +14,7 @@ export async function GET(req: NextRequest) { if (isAuthorizedDomain(req.url)) { const { cronCompleted, cronFailed } = runSentryCron("1-m-cron"); try { - await cron({ periodicity: "1m", req }); + await cron({ periodicity: "1m" }); await cronCompleted(); } catch (_error) { await cronFailed(); diff --git a/apps/web/src/app/api/checker/cron/30m/route.ts b/apps/web/src/app/api/checker/cron/30m/route.ts index ee763b1c07..64ed48bb23 100644 --- a/apps/web/src/app/api/checker/cron/30m/route.ts +++ b/apps/web/src/app/api/checker/cron/30m/route.ts @@ -14,7 +14,7 @@ export async function GET(req: NextRequest) { if (isAuthorizedDomain(req.url)) { const { cronCompleted, cronFailed } = runSentryCron("30-m-cron"); try { - await cron({ periodicity: "30m", req }); + await cron({ periodicity: "30m" }); await cronCompleted(); } catch (_error) { await cronFailed(); diff --git a/apps/web/src/app/api/checker/cron/30s/route.ts b/apps/web/src/app/api/checker/cron/30s/route.ts index afcf1c9775..a0bd506ac0 100644 --- a/apps/web/src/app/api/checker/cron/30s/route.ts +++ b/apps/web/src/app/api/checker/cron/30s/route.ts @@ -14,7 +14,7 @@ export async function GET(req: NextRequest) { if (isAuthorizedDomain(req.url)) { const { cronCompleted, cronFailed } = runSentryCron("30-s-cron"); try { - await cron({ periodicity: "30s", req }); + await cron({ periodicity: "30s" }); await cronCompleted(); } catch (_error) { await cronFailed(); diff --git a/apps/web/src/app/api/checker/cron/5m/route.ts b/apps/web/src/app/api/checker/cron/5m/route.ts index 000bf79e0c..1d52bd6620 100644 --- a/apps/web/src/app/api/checker/cron/5m/route.ts +++ b/apps/web/src/app/api/checker/cron/5m/route.ts @@ -14,7 +14,7 @@ export async function GET(req: NextRequest) { if (isAuthorizedDomain(req.url)) { const { cronCompleted, cronFailed } = runSentryCron("5-m-cron"); try { - await cron({ periodicity: "5m", req }); + await cron({ periodicity: "5m" }); await cronCompleted(); } catch (_error) { await cronFailed(); diff --git a/apps/web/src/app/api/checker/cron/_cron.ts b/apps/web/src/app/api/checker/cron/_cron.ts index bb0c575657..f30c6b7eb5 100644 --- a/apps/web/src/app/api/checker/cron/_cron.ts +++ b/apps/web/src/app/api/checker/cron/_cron.ts @@ -1,6 +1,5 @@ import { CloudTasksClient } from "@google-cloud/tasks"; import type { google } from "@google-cloud/tasks/build/protos/protos"; -import type { NextRequest } from "next/server"; import { z } from "zod"; import { and, db, eq, gte, isNotNull, lte, notInArray } from "@openstatus/db"; @@ -41,9 +40,7 @@ export const isAuthorizedDomain = (url: string) => { export const cron = async ({ periodicity, - // biome-ignore lint/correctness/noUnusedVariables: - req, -}: z.infer & { req: NextRequest }) => { +}: z.infer) => { const client = new CloudTasksClient({ projectId: env.GCP_PROJECT_ID, credentials: { diff --git a/packages/db/src/schema/monitors/validation.ts b/packages/db/src/schema/monitors/validation.ts index af147ab0f2..8e0e5f073a 100644 --- a/packages/db/src/schema/monitors/validation.ts +++ b/packages/db/src/schema/monitors/validation.ts @@ -11,10 +11,6 @@ export const monitorMethodsSchema = z.enum(monitorMethods); export const monitorStatusSchema = z.enum(monitorStatus); export const monitorJobTypesSchema = z.enum(monitorJobTypes); -// TODO: shared function -// biome-ignore lint/correctness/noUnusedVariables: -function stringToArrayProcess(_string: T) {} - const regionsToArraySchema = z.preprocess((val) => { if (String(val).length > 0) { return String(val).split(",");