Initial Commit
This commit is contained in:
@@ -4,11 +4,11 @@
|
||||
*/
|
||||
import Redis from 'ioredis';
|
||||
import { logger } from '../logging/logger';
|
||||
import { env } from './environment';
|
||||
import { getTenantConfig } from './tenant';
|
||||
|
||||
export const redis = new Redis({
|
||||
host: env.REDIS_HOST,
|
||||
port: env.REDIS_PORT,
|
||||
const tenant = getTenantConfig();
|
||||
|
||||
export const redis = new Redis(tenant.redisUrl, {
|
||||
retryStrategy: (times) => Math.min(times * 50, 2000),
|
||||
});
|
||||
|
||||
@@ -55,4 +55,4 @@ export class CacheService {
|
||||
}
|
||||
}
|
||||
|
||||
export const cacheService = new CacheService();
|
||||
export const cacheService = new CacheService();
|
||||
|
||||
Reference in New Issue
Block a user