mirror of
https://github.com/n8n-io/n8n.git
synced 2025-01-12 13:27:31 -08:00
fix(Postgres Node): Tunnel doesn't always close (#7087)
This commit is contained in:
parent
400949daa4
commit
58e55ba669
|
@ -135,7 +135,7 @@ const properties: INodeProperties[] = [
|
||||||
},
|
},
|
||||||
displayOptions: {
|
displayOptions: {
|
||||||
show: {
|
show: {
|
||||||
'@version': [2.2],
|
'@version': [2.2, 2.3],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -172,7 +172,7 @@ const properties: INodeProperties[] = [
|
||||||
},
|
},
|
||||||
displayOptions: {
|
displayOptions: {
|
||||||
show: {
|
show: {
|
||||||
'@version': [2.2],
|
'@version': [2.2, 2.3],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -171,7 +171,7 @@ const properties: INodeProperties[] = [
|
||||||
},
|
},
|
||||||
displayOptions: {
|
displayOptions: {
|
||||||
show: {
|
show: {
|
||||||
'@version': [2.2],
|
'@version': [2.2, 2.3],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -47,7 +47,7 @@ export async function getMappingColumns(
|
||||||
): Promise<ResourceMapperFields> {
|
): Promise<ResourceMapperFields> {
|
||||||
const credentials = await this.getCredentials('postgres');
|
const credentials = await this.getCredentials('postgres');
|
||||||
|
|
||||||
const { db } = await configurePostgres(credentials);
|
const { db, sshClient } = await configurePostgres(credentials);
|
||||||
|
|
||||||
const schema = this.getNodeParameter('schema', 0, {
|
const schema = this.getNodeParameter('schema', 0, {
|
||||||
extractValue: true,
|
extractValue: true,
|
||||||
|
@ -88,5 +88,10 @@ export async function getMappingColumns(
|
||||||
return { fields };
|
return { fields };
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
throw error;
|
throw error;
|
||||||
|
} finally {
|
||||||
|
if (sshClient) {
|
||||||
|
sshClient.end();
|
||||||
|
}
|
||||||
|
await db.$pool.end();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue