mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
fix(Postgres Chat Memory Node): Do not terminate the connection pool (#12674)
This commit is contained in:
committed by
GitHub
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();
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user