mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
feat(core): Introduce DB health check (#10661)
This commit is contained in:
@@ -39,11 +39,16 @@ export async function init() {
|
||||
await Db.migrate();
|
||||
}
|
||||
|
||||
export function isReady() {
|
||||
return Db.connectionState.connected && Db.connectionState.migrated;
|
||||
}
|
||||
|
||||
/**
|
||||
* Drop test DB, closing bootstrap connection if existing.
|
||||
*/
|
||||
export async function terminate() {
|
||||
await Db.close();
|
||||
Db.connectionState.connected = false;
|
||||
}
|
||||
|
||||
// Can't use `Object.keys(entities)` here because some entities have a `Entity` suffix, while the repositories don't
|
||||
|
||||
Reference in New Issue
Block a user