mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
fix(core): Pg-promise de-initialization fix (#7417)
Github issue / Community forum post (link here to close automatically): https://community.n8n.io/t/postgres-node-called-end-on-pool-more-than-once/30585/1
This commit is contained in:
@@ -256,15 +256,15 @@ export class QuestDb implements INodeType {
|
||||
|
||||
returnItems = this.helpers.returnJsonArray(insertData);
|
||||
} else {
|
||||
pgp.end();
|
||||
await db.$pool.end();
|
||||
throw new NodeOperationError(
|
||||
this.getNode(),
|
||||
`The operation "${operation}" is not supported!`,
|
||||
);
|
||||
}
|
||||
|
||||
// Close the connection
|
||||
pgp.end();
|
||||
// shuts down the connection pool associated with the db object to allow the process to finish
|
||||
await db.$pool.end();
|
||||
|
||||
return [returnItems];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user