only disconnect redis message queue client if it is different from cache client
This commit is contained in:
@ -28,9 +28,12 @@ export class RedisDataSource {
|
||||
|
||||
async shutdown(): Promise<void> {
|
||||
try {
|
||||
await this.queueRedisClient?.quit()
|
||||
await this.cacheClient?.quit()
|
||||
|
||||
if (this.queueRedisClient !== this.cacheClient) {
|
||||
await this.queueRedisClient.quit()
|
||||
}
|
||||
|
||||
console.log('redis shutdown complete')
|
||||
} catch (err) {
|
||||
console.error('error while shutting down redis', err)
|
||||
|
||||
Reference in New Issue
Block a user