feat(prodsqlconnection): added in prod connection with restart attempts and fail with notify

This commit is contained in:
2025-09-01 16:46:29 -05:00
parent bfb62df445
commit 083f38a079
11 changed files with 315 additions and 44 deletions

View File

@@ -1,7 +1,8 @@
import { drizzle } from "drizzle-orm/postgres-js";
import postgres from "postgres";
import { env } from "../utils/envValidator.js";
const dbURL = `postgres://${process.env.DATABASE_USER}:${process.env.DATABASE_PASSWORD}@${process.env.DATABASE_HOST}:${process.env.DATABASE_PORT}/${process.env.DATABASE_DB}`;
const dbURL = `postgres://${env.DATABASE_USER}:${env.DATABASE_PASSWORD}@${env.DATABASE_HOST}:${env.DATABASE_PORT}/${env.DATABASE_DB}`;
const queryClient = postgres(dbURL, {
max: 10,