14 lines
No EOL
411 B
TypeScript
14 lines
No EOL
411 B
TypeScript
import Redis from 'ioredis';
|
|
import { getWorkerConfig } from '@wcag-ada/config';
|
|
|
|
const workerConfig = getWorkerConfig();
|
|
|
|
export function createRedisConnection(): Redis {
|
|
return new Redis({
|
|
host: workerConfig.redis.host,
|
|
port: workerConfig.redis.port,
|
|
password: workerConfig.redis.password,
|
|
db: workerConfig.redis.db,
|
|
maxRetriesPerRequest: workerConfig.redis.maxRetriesPerRequest,
|
|
});
|
|
} |