stock-bot/apps/wcag-ada/worker/src/utils/redis.ts
2025-06-28 11:11:34 -04:00

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,
});
}