refactor(database): 🔥 Remove unnecessary Redis connections

This commit is contained in:
Jesse Wierzbinski 2025-04-10 18:58:44 +02:00
parent dc1b58a791
commit e7aec8752c
No known key found for this signature in database
2 changed files with 3 additions and 19 deletions

View file

@ -1,7 +1,7 @@
import { configureLoggers } from "@/loggers";
import { connection } from "@/redis.ts";
import { getLogger } from "@logtape/logtape";
import { Note } from "@versia/kit/db";
import IORedis from "ioredis";
import { config } from "~/config.ts";
import { setupDatabase } from "~/drizzle/db";
import { searchManager } from "../../classes/search/search-manager.ts";
@ -37,14 +37,6 @@ serverLogger.info`Versia Server started at ${config.http.bind}:${config.http.bin
serverLogger.info`Database is online, now serving ${postCount} posts`;
// Check if Redis is reachable
const connection = new IORedis({
host: config.redis.queue.host,
port: config.redis.queue.port,
password: config.redis.queue.password,
db: config.redis.queue.database,
maxRetriesPerRequest: null,
});
await connection.ping();
serverLogger.info`Redis is online`;

View file

@ -1,8 +1,8 @@
import { configureLoggers } from "@/loggers";
import { connection } from "@/redis.ts";
import { getLogger } from "@logtape/logtape";
import { Note } from "@versia/kit/db";
import chalk from "chalk";
import IORedis from "ioredis";
import { config } from "~/config.ts";
import { setupDatabase } from "~/drizzle/db";
import { searchManager } from "../../classes/search/search-manager.ts";
@ -14,7 +14,7 @@ await configureLoggers();
const serverLogger = getLogger("server");
console.info(`
@ -39,14 +39,6 @@ serverLogger.info`Versia Server Worker started at ${config.http.bind}:${config.h
serverLogger.info`Database is online, containing ${postCount} posts`;
// Check if Redis is reachable
const connection = new IORedis({
host: config.redis.queue.host,
port: config.redis.queue.port,
password: config.redis.queue.password,
db: config.redis.queue.database,
maxRetriesPerRequest: null,
});
await connection.ping();
serverLogger.info`Redis is online`;