1
1
mirror of https://github.com/n8n-io/n8n.git synced 2024-09-20 17:37:25 +03:00

fix(Postgres Node): Tunnel doesn't always close (#7087)

This commit is contained in:
Michael Kret 2023-09-04 13:26:02 +03:00 committed by GitHub
parent 400949daa4
commit 58e55ba669
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 4 deletions

View File

@ -135,7 +135,7 @@ const properties: INodeProperties[] = [
},
displayOptions: {
show: {
'@version': [2.2],
'@version': [2.2, 2.3],
},
},
},

View File

@ -172,7 +172,7 @@ const properties: INodeProperties[] = [
},
displayOptions: {
show: {
'@version': [2.2],
'@version': [2.2, 2.3],
},
},
},

View File

@ -171,7 +171,7 @@ const properties: INodeProperties[] = [
},
displayOptions: {
show: {
'@version': [2.2],
'@version': [2.2, 2.3],
},
},
},

View File

@ -47,7 +47,7 @@ export async function getMappingColumns(
): Promise<ResourceMapperFields> {
const credentials = await this.getCredentials('postgres');
const { db } = await configurePostgres(credentials);
const { db, sshClient } = await configurePostgres(credentials);
const schema = this.getNodeParameter('schema', 0, {
extractValue: true,
@ -88,5 +88,10 @@ export async function getMappingColumns(
return { fields };
} catch (error) {
throw error;
} finally {
if (sshClient) {
sshClient.end();
}
await db.$pool.end();
}
}