fix(Postgres Chat Memory Node): Do not terminate the connection pool (#12674)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™ 2025-01-17 14:58:19 +01:00 committed by GitHub
parent e6a15dfba3
commit e7f00bcb7f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 1 additions and 6 deletions

View file

@ -115,12 +115,7 @@ export class MemoryPostgresChat implements INodeType {
...kOptions,
});
async function closeFunction() {
void pool.end();
}
return {
closeFunction,
response: logWrapper(memory, this),
};
}

View file

@ -186,7 +186,7 @@ export async function configurePostgres(
nodeVersion: options.nodeVersion as unknown as string,
fallBackHandler,
cleanUpHandler: async ({ db }) => {
await db.$pool.end();
if (!db.$pool.ended) await db.$pool.end();
},
});
}