Skip to content

Commit

Permalink
Introduce Debug REDIS_IP
Browse files Browse the repository at this point in the history
  • Loading branch information
lucemans committed Oct 25, 2022
1 parent e77d50a commit bfe6717
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion apps/groot/src/cache.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import { createClient } from 'redis';

import { Globals } from '.';

export const CACHE = createClient({
url: process.env.REDIS_IP || 'redis://127.0.0.1:6379',
url: Globals.REDIS_IP,
});

(async () => {
Expand Down
4 changes: 3 additions & 1 deletion apps/groot/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ export const Globals = {
ENVIRONMENT: process.env.ENVIRONMENT || 'dev',
SENTRY_SAMPLE_RATE: process.env.ENVIRONMENT == 'production' ? 0.1 : 1,
INSTANCE_ID: process.env.INSTANCE_ID || 'localhost',
REDIS_IP: process.env.REDIS_IP || 'redis://127.0.0.1:6379'
};

export const StorageBackend: GenericStorage = new SignalStorage();
Expand All @@ -63,7 +64,8 @@ export const StorageBackend: GenericStorage = new SignalStorage();
? chalk.gray(Globals.SENTRY_DSN)
: chalk.red('MISSING')),
'SAMPLE RATE ' + chalk.gray(Globals.SENTRY_SAMPLE_RATE),
'INSTANCE_ID ' + chalk.gray(Globals.INSTANCE_ID)
'INSTANCE_ID ' + chalk.gray(Globals.INSTANCE_ID),
'REDIS_IP ' + chalk.gray(Globals.REDIS_IP),
);
log.empty();

Expand Down

0 comments on commit bfe6717

Please sign in to comment.