mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
✨ Addi an optional database field to redis (#2634)
This commit is contained in:
parent
878382be15
commit
67d876e559
|
@ -30,5 +30,11 @@ export class Redis implements ICredentialType {
|
||||||
type: 'number',
|
type: 'number',
|
||||||
default: 6379,
|
default: 6379,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
displayName: 'Database',
|
||||||
|
name: 'database',
|
||||||
|
type: 'number',
|
||||||
|
default: 0,
|
||||||
|
},
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -507,6 +507,7 @@ export class Redis implements INodeType {
|
||||||
});
|
});
|
||||||
|
|
||||||
client.on('ready', async (err: Error | null) => {
|
client.on('ready', async (err: Error | null) => {
|
||||||
|
client.select(credentials.database as number);
|
||||||
try {
|
try {
|
||||||
if (operation === 'info') {
|
if (operation === 'info') {
|
||||||
const clientInfo = util.promisify(client.info).bind(client);
|
const clientInfo = util.promisify(client.info).bind(client);
|
||||||
|
|
Loading…
Reference in a new issue