mirror of
https://github.com/Ryujinx/Ryujinx-Ldn-Website.git
synced 2025-08-11 20:41:11 +00:00
Configure Redis error handler and client correctly
This commit is contained in:
parent
415a9b43ce
commit
6accc2aceb
|
@ -23,11 +23,15 @@ export const logger = loggerInstance.child({
|
||||||
// Init Redis client
|
// Init Redis client
|
||||||
export const redisClient = createClient({
|
export const redisClient = createClient({
|
||||||
url: process.env.REDIS_URL,
|
url: process.env.REDIS_URL,
|
||||||
readonly: true,
|
// NOTE: Enable this if we ever start using cluster mode
|
||||||
|
// readonly: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
redisClient.on("error", (err: Error) =>
|
redisClient.on("error", (err: Error) =>
|
||||||
loggerInstance.error("An error occurred.", { source: "Redis client", error: err })
|
loggerInstance.error(err.message, {
|
||||||
|
source: "Redis client",
|
||||||
|
stacktrace: err.stack,
|
||||||
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
// Init express server
|
// Init express server
|
||||||
|
|
Loading…
Reference in a new issue