mirror of
https://github.com/IT4Change/gradido.git
synced 2026-03-01 12:44:43 +00:00
clear pointer on AppDatabase.destroy
This commit is contained in:
parent
798a6b5bdd
commit
1065ddb645
@ -113,21 +113,15 @@ export class AppDatabase {
|
|||||||
database: CONFIG.DB_DATABASE,
|
database: CONFIG.DB_DATABASE,
|
||||||
port: CONFIG.DB_PORT,
|
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 })
|
this.drizzleDataSource = drizzle({ client: this.drizzleConnection })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public async destroy(): Promise<void> {
|
public async destroy(): Promise<void> {
|
||||||
await Promise.all([this.dataSource?.destroy(), this.drizzleConnection?.end()])
|
await Promise.all([this.dataSource?.destroy(), this.drizzleConnection?.end()])
|
||||||
|
this.dataSource = undefined
|
||||||
|
this.drizzleConnection = undefined
|
||||||
|
this.drizzleDataSource = undefined
|
||||||
if (this.redisClient) {
|
if (this.redisClient) {
|
||||||
await this.redisClient.quit()
|
await this.redisClient.quit()
|
||||||
this.redisClient = undefined
|
this.redisClient = undefined
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user