mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +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:
@@ -224,7 +224,7 @@ export class PostgresTrigger implements INodeType {
|
||||
const additionalFields = this.getNodeParameter('additionalFields', 0) as IDataObject;
|
||||
|
||||
// initialize and connect to database
|
||||
const { db, pgp } = await initDB.call(this);
|
||||
const { db } = await initDB.call(this);
|
||||
const connection = await db.connect({ direct: true });
|
||||
|
||||
// prepare and set up listener
|
||||
@@ -284,7 +284,7 @@ export class PostgresTrigger implements INodeType {
|
||||
`Postgres Trigger Error: ${(error as Error).message}`,
|
||||
);
|
||||
} finally {
|
||||
pgp.end();
|
||||
await db.$pool.end();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user