skunight / nestjs-redis

nestjs redis module
MIT License
321 stars 173 forks source link

fix: client name ignored while creating single client. #41

Closed teralad closed 4 years ago

teralad commented 4 years ago
@Module({
  imports: [
    RedisModule.register({ name: "REDIS", url: redis.host }),

The above snippet creates redis client with uuid instead of 'REDIS'.

This PR fixes an issue where name isn't considered while creating a single client.

skunight commented 4 years ago

Here's a problem. If opt.name is set. then execuse RedisService.getClient() with no args. It will throw a client not exists error.

teralad commented 4 years ago

Thanks for pointing it out. I'll take a look at that.

teralad commented 4 years ago

Hi, Now the single client works with / without name. Please take a look.