diff --git a/src/db/redis.client.ts b/src/db/redis.client.ts index 035ace54..921bb0b4 100644 --- a/src/db/redis.client.ts +++ b/src/db/redis.client.ts @@ -79,4 +79,20 @@ export class RedisCache { this.logger.error(error); } } + + public async closeConnection() { + try { + await this.client.quit(); + } catch (error) { + this.logger.error(error); + } + } + + public async destructor() { + await this.closeConnection(); + } + + public async destroy() { + await this.destructor(); + } }