Skip to content

Commit 80ac375

Browse files
committed
fix: finally fixed it ???
1 parent c282445 commit 80ac375

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

src/index.ts

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -393,22 +393,24 @@ class Fast42 {
393393

394394
private createRedisLimiter(limit: RateLimit, concurrentOffset: number, redisConfig: RedisConfig): Bottleneck {
395395
// Create a redis client
396-
const client = createClient(redisConfig.port, redisConfig.host, {
397-
port: redisConfig.port,
398-
host: redisConfig.host,
399-
password: redisConfig.password,
400-
});
396+
// const client = createClient(redisConfig.port, redisConfig.host, {
397+
// password: redisConfig.password,
398+
// });
401399

402-
client.on('error', function (err) {
403-
console.log('Redis client encountered an error: ', err);
404-
});
400+
// client.on('error', function (err) {
401+
// console.log('Redis client encountered an error: ', err);
402+
// });
405403

406404
const limiter = new Bottleneck({
407405
// Redis options
408406
id: 'fast42',
409407
datastore: 'redis',
410408
clearDatastore: false,
411-
client: client,
409+
clientOptions: {
410+
host: redisConfig.host,
411+
port: redisConfig.port,
412+
password: redisConfig.password,
413+
},
412414

413415
// Hourly rate limit
414416
reservoir: limit.hourly_remaining,

0 commit comments

Comments
 (0)