Skip to content

Commit

Permalink
simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
jsbroks committed Oct 16, 2024
1 parent 55595cb commit da0db8c
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 5 deletions.
2 changes: 0 additions & 2 deletions apps/webservice/src/app/api/healthz/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@ import { NextResponse } from "next/server";

import { sql } from "@ctrlplane/db";
import { db } from "@ctrlplane/db/client";
import { checkHealth } from "@ctrlplane/job-dispatch";

export const GET = async () => {
try {
await checkHealth();
await db.execute(sql`SELECT 1`);
} catch (error) {
console.error(error);
Expand Down
1 change: 0 additions & 1 deletion apps/webservice/src/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ export const env = createEnv({
GITHUB_BOT_PRIVATE_KEY: z.string().optional(),
GITHUB_WEBHOOK_SECRET: z.string().optional(),
BASE_URL: z.string(),
REDIS_URL: z.string(),
OTEL_SAMPLER_RATIO: z.number().optional().default(1),
},

Expand Down
2 changes: 0 additions & 2 deletions packages/job-dispatch/src/queue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,3 @@ export const dispatchJobsQueue = new Queue<DispatchJobEvent>(
Channel.DispatchJob,
{ connection },
);

export const checkHealth = () => connection.ping();

0 comments on commit da0db8c

Please sign in to comment.