mirror of
https://github.com/n8n-io/n8n.git
synced 2025-02-02 07:01:30 -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,
|
...kOptions,
|
||||||
});
|
});
|
||||||
|
|
||||||
async function closeFunction() {
|
|
||||||
void pool.end();
|
|
||||||
}
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
closeFunction,
|
|
||||||
response: logWrapper(memory, this),
|
response: logWrapper(memory, this),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -186,7 +186,7 @@ export async function configurePostgres(
|
||||||
nodeVersion: options.nodeVersion as unknown as string,
|
nodeVersion: options.nodeVersion as unknown as string,
|
||||||
fallBackHandler,
|
fallBackHandler,
|
||||||
cleanUpHandler: async ({ db }) => {
|
cleanUpHandler: async ({ db }) => {
|
||||||
await db.$pool.end();
|
if (!db.$pool.ended) await db.$pool.end();
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue