From 5e627d099cd0dc26ee5c05431194aec0844065d2 Mon Sep 17 00:00:00 2001 From: kakkokari-gtyih <67428053+kakkokari-gtyih@users.noreply.github.com> Date: Mon, 28 Oct 2024 15:31:08 +0900 Subject: [PATCH] fix --- packages/backend/scripts/check_connect.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/packages/backend/scripts/check_connect.js b/packages/backend/scripts/check_connect.js index de567e4b27..bb149444b5 100644 --- a/packages/backend/scripts/check_connect.js +++ b/packages/backend/scripts/check_connect.js @@ -5,19 +5,16 @@ import Redis from 'ioredis'; import { loadConfig } from '../built/config.js'; +import { createPostgresDataSource } from '../built/postgres.js'; const config = loadConfig(); -// createPostgresDataSource handels primaries and replicas automatically. -// usually, it only opens connections first use, so we force it using -// .initialize() -async function connectToPostgres(){ +async function connectToPostgres() { const source = createPostgresDataSource(config); await source.initialize(); await source.destroy(); } -// Connect to all redis servers async function connectToRedis(redisOptions) { return await new Promise(async (resolve, reject) => { const redis = new Redis({