mirror of
https://github.com/umami-software/umami.git
synced 2025-12-08 05:12:36 +01:00
Add retry connection to redis. Clean up up redis/session logic
This commit is contained in:
parent
81ca9c9665
commit
99914d6e98
5 changed files with 16 additions and 9 deletions
|
|
@ -13,7 +13,12 @@ function getClient() {
|
|||
return null;
|
||||
}
|
||||
|
||||
const redis = new Redis(process.env.REDIS_URL);
|
||||
const redis = new Redis(process.env.REDIS_URL, {
|
||||
retryStrategy(times) {
|
||||
log(`Redis reconnecting attempt: ${times}`);
|
||||
return 5000;
|
||||
},
|
||||
});
|
||||
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
global[REDIS] = redis;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue