From 1065ddb645892808ebc1a41e3a47f35c9c671c27 Mon Sep 17 00:00:00 2001 From: einhornimmond Date: Sat, 6 Dec 2025 17:09:26 +0100 Subject: [PATCH] clear pointer on AppDatabase.destroy --- database/src/AppDatabase.ts | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/database/src/AppDatabase.ts b/database/src/AppDatabase.ts index 9a8a3727d..e35043991 100644 --- a/database/src/AppDatabase.ts +++ b/database/src/AppDatabase.ts @@ -113,21 +113,15 @@ export class AppDatabase { database: CONFIG.DB_DATABASE, port: CONFIG.DB_PORT, }) - console.log({ - host: CONFIG.DB_HOST, - user: CONFIG.DB_USER, - password: CONFIG.DB_PASSWORD, - database: CONFIG.DB_DATABASE, - port: CONFIG.DB_PORT - }) - const result = await this.drizzleConnection.execute('SELECT * from migrations order by version DESC limit 1') - console.log(result) this.drizzleDataSource = drizzle({ client: this.drizzleConnection }) } } public async destroy(): Promise { await Promise.all([this.dataSource?.destroy(), this.drizzleConnection?.end()]) + this.dataSource = undefined + this.drizzleConnection = undefined + this.drizzleDataSource = undefined if (this.redisClient) { await this.redisClient.quit() this.redisClient = undefined