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
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();
}
}