Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

default client is exists Error: default client is exists #36

Open
zohu opened this issue Mar 3, 2020 · 0 comments
Open

default client is exists Error: default client is exists #36

zohu opened this issue Mar 3, 2020 · 0 comments

Comments

@zohu
Copy link

zohu commented Mar 3, 2020

Hi,would you consider supporting the cluster? IORedis.Cluster. thanks.

RedisModule.forRootAsync({
    useFactory: (config: Boot) => {
        return [
            {
                host: '192.168.1.84',
                port: '6379',
                db: 0,
                password: 'xxx',
            },
            {/** more */},
            /** more */
        ]
    }
})

ERROR:

default client is exists Error: default client is exists
    at InstanceWrapper.useFactory [as metatype] (/Users/micro-application/node_modules/nestjs-redis/dist/redis-client.provider.js:29:31)
    at Injector.instantiateClass (/Users/micro-application/node_modules/@nestjs/core/injector/injector.js:291:55)
    at callback (/Users/micro-application/node_modules/@nestjs/core/injector/injector.js:75:41)
    at async Injector.resolveConstructorParams (/Users/micro-application/node_modules/@nestjs/core/injector/injector.js:116:24)
    at async Injector.loadInstance (/Users/micro-application/node_modules/@nestjs/core/injector/injector.js:79:9)
    at async Injector.loadProvider (/Users/micro-application/node_modules/@nestjs/core/injector/injector.js:36:9)
    at async Promise.all (index 4)
    at async InstanceLoader.createInstancesOfProviders (/Users/micro-application/node_modules/@nestjs/core/injector/instance-loader.js:41:9)
    at async /Users/micro-application/node_modules/@nestjs/core/injector/instance-loader.js:27:13
    at async Promise.all (index 15)
    at async InstanceLoader.createInstances (/Users/micro-application/node_modules/@nestjs/core/injector/instance-loader.js:26:9)
    at async InstanceLoader.createInstancesOfDependencies (/Users/micro-application/node_modules/@nestjs/core/injector/instance-loader.js:16:9)
    at async /Users/micro-application/node_modules/@nestjs/core/nest-factory.js:82:17
    at async Function.asyncRun (/Users/micro-application/node_modules/@nestjs/core/errors/exceptions-zone.js:17:13)
    at async NestFactoryStatic.initialize (/Users/micro-application/node_modules/@nestjs/core/nest-factory.js:80:13)
    at async NestFactoryStatic.create (/Users/micro-application/node_modules/@nestjs/core/nest-factory.js:31:9)

so, add the name field

{
    name: 'some name'
    host: '192.168.1.84',
    port: 6379,
    db: 0,
    password: 'xxx',
}

ERROR:

(error) MOVED 12539 192.168.1.85:6379
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant