Skip to content

Commit

Permalink
Log errors from KeyDB/Redis (#49)
Browse files Browse the repository at this point in the history
  • Loading branch information
soulgalore authored Jun 28, 2024
1 parent dc4459b commit 626fd86
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion server/src/queuehandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 626fd86

Please sign in to comment.