mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
fix(Postgres Node): Tunnel doesn't always close (#7087)
This commit is contained in:
@@ -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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user