File tree Expand file tree Collapse file tree 1 file changed +11
-9
lines changed
Expand file tree Collapse file tree 1 file changed +11
-9
lines changed Original file line number Diff line number Diff 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 ,
You can’t perform that action at this time.
0 commit comments