Skip to content

Commit

Permalink
Revert "BC-6318 Register error event handler for redis client (#4708)"
Browse files Browse the repository at this point in the history
This reverts commit e2186d5.
  • Loading branch information
dyedwiper committed Jan 23, 2024
1 parent e2186d5 commit 185bafc
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/utils/redis.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ const redis = require('redis');
const { Configuration } = require('@hpi-schul-cloud/commons');

const { GeneralError } = require('../errors');
const logger = require('../logger');

let redisClient = false;

Expand All @@ -16,11 +15,6 @@ async function initializeRedisClient() {
legacyMode: true,
});
await redisClient.connect();

// The error event must be handled, otherwise the app crashes on redis connection errors.
redisClient.on('error', (err) => {
logger.error('Redis client error', err);
});
} catch (err) {
throw new GeneralError('Redis connection failed!', err);
}
Expand Down

0 comments on commit 185bafc

Please sign in to comment.