From 94cb6b63b183b83eb95e62e9982fa3a028d1688c Mon Sep 17 00:00:00 2001 From: Peter Hedenskog Date: Fri, 28 Jun 2024 12:31:25 +0200 Subject: [PATCH] Log errors from KeyDB/Redis --- server/src/queuehandler.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/server/src/queuehandler.js b/server/src/queuehandler.js index acb1242..3f0aac8 100755 --- a/server/src/queuehandler.js +++ b/server/src/queuehandler.js @@ -17,11 +17,15 @@ function getRedis() { 'You use the default password for Redis/KeyDB, please change it!' ); } - return new Redis({ + const redis = new Redis({ port: REDIS_PORT, host: REDIS_HOST, password: REDIS_PASSWORD }); + redis.on('error', error => { + logger.error('Could not connect to Redis/KeyDB', error); + }); + return redis; } export async function publish(channel, message) {