mirror of
https://github.com/versia-pub/server.git
synced 2025-12-06 08:28:19 +01:00
refactor(database): 🔥 Remove unnecessary Redis connections
This commit is contained in:
parent
dc1b58a791
commit
e7aec8752c
|
|
@ -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`;
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
|
@ -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`;
|
||||
|
|
|
|||
Loading…
Reference in a new issue