Addi an optional database field to redis (#2634)

This commit is contained in:
Pierre 2022-01-08 21:07:35 +04:00 committed by GitHub
parent 878382be15
commit 67d876e559
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions

View file

@ -30,5 +30,11 @@ export class Redis implements ICredentialType {
type: 'number',
default: 6379,
},
{
displayName: 'Database',
name: 'database',
type: 'number',
default: 0,
},
];
}

View file

@ -507,6 +507,7 @@ export class Redis implements INodeType {
});
client.on('ready', async (err: Error | null) => {
client.select(credentials.database as number);
try {
if (operation === 'info') {
const clientInfo = util.promisify(client.info).bind(client);