backend: Improve logging for Redis subscriber connection events

This commit is contained in:
Carlos Santos 2025-03-31 12:44:45 +02:00
parent 58e79e2e7e
commit 21e959d190

View File

@ -60,11 +60,11 @@ export class RedisService extends EventEmitter {
};
this.redisPublisher.on('connect', onConnect);
this.redisSubscriber.on('connect', onConnect);
this.redisSubscriber.on('connect', () => this.logger.verbose('Connected to Redis subscriber'));
this.redisPublisher.on('error', onError);
this.redisSubscriber.on('error', onError);
this.redisSubscriber.on('error', (error) => this.logger.error('Redis Subscriber Error', error));
this.redisPublisher.on('end', onDisconnect);
this.redisSubscriber.on('end', onDisconnect);
this.redisSubscriber.on('end', () => this.logger.warn('Redis subscriber disconnected'));
}
createRedlock(retryCount = -1, retryDelay = 200) {