feat: get redis port & host from env

This commit is contained in:
karishmas6
2024-10-30 04:06:29 +05:30
parent 239412bc09
commit fc29b1a86c

View File

@@ -6,8 +6,8 @@ import Robot from './models/Robot';
import { computeNextRun } from './utils/schedule';
const connection = new IORedis({
host: 'localhost',
port: 6379,
host: process.env.REDIS_HOST || 'localhost',
port: process.env.REDIS_PORT ? parseInt(process.env.REDIS_PORT, 10) : 6379,
maxRetriesPerRequest: null,
});