mirror of
https://github.com/n8n-io/n8n.git
synced 2025-01-30 22:02:03 -08:00
fix(Postgres Chat Memory Node): Do not terminate the connection pool (#12674)
This commit is contained in:
parent
e6a15dfba3
commit
e7f00bcb7f
|
@ -115,12 +115,7 @@ export class MemoryPostgresChat implements INodeType {
|
|||
...kOptions,
|
||||
});
|
||||
|
||||
async function closeFunction() {
|
||||
void pool.end();
|
||||
}
|
||||
|
||||
return {
|
||||
closeFunction,
|
||||
response: logWrapper(memory, this),
|
||||
};
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
},
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue