From 80ac3757c5d0fe55b87a973ec2de36368724af47 Mon Sep 17 00:00:00 2001 From: Oscar Mulder Date: Sat, 17 Jun 2023 17:04:58 +0200 Subject: [PATCH] fix: finally fixed it ??? --- src/index.ts | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/index.ts b/src/index.ts index a0f3351..3cd8ba4 100644 --- a/src/index.ts +++ b/src/index.ts @@ -393,22 +393,24 @@ class Fast42 { private createRedisLimiter(limit: RateLimit, concurrentOffset: number, redisConfig: RedisConfig): Bottleneck { // Create a redis client - const client = createClient(redisConfig.port, redisConfig.host, { - port: redisConfig.port, - host: redisConfig.host, - password: redisConfig.password, - }); + // const client = createClient(redisConfig.port, redisConfig.host, { + // password: redisConfig.password, + // }); - client.on('error', function (err) { - console.log('Redis client encountered an error: ', err); - }); + // client.on('error', function (err) { + // console.log('Redis client encountered an error: ', err); + // }); const limiter = new Bottleneck({ // Redis options id: 'fast42', datastore: 'redis', clearDatastore: false, - client: client, + clientOptions: { + host: redisConfig.host, + port: redisConfig.port, + password: redisConfig.password, + }, // Hourly rate limit reservoir: limit.hourly_remaining,