fix: add the redis extension conditionally (#5524)

* fix: add the redis extension conditionally

* chore: import order and stuff

* fix: added logger, error handling and routing

* feat: configured sentry with source maps

* fix: sentry config and returning json

* fix: remove on change logs

* fix: add pretty print
This commit is contained in:
M. Palanikannan 2024-09-05 18:15:46 +05:30 committed by GitHub
parent 406ffcd7de
commit e1380f52ec
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 644 additions and 212 deletions

View file

@ -0,0 +1,15 @@
export function getRedisUrl() {
const redisUrl = process.env.REDIS_URL?.trim();
const redisHost = process.env.REDIS_HOST?.trim();
const redisPort = process.env.REDIS_PORT?.trim();
if (redisUrl) {
return redisUrl;
}
if (redisHost && redisPort && !Number.isNaN(Number(redisPort))) {
return `redis://${redisHost}:${redisPort}`;
}
return "";
}