mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
feat(core): Improve health check (#6205)
* remove unnecesary Db re-initialization this is from before we added `Db.init` in `WorkflowRunnerProcess` * feat(core): Improved health check * make health check not care about DB connections * close DB connections, and shutdown the timer
This commit is contained in:
committed by
GitHub
parent
e3f47994b1
commit
9e7b9fb443
@@ -21,7 +21,7 @@ import { ActiveExecutions } from '@/ActiveExecutions';
|
||||
import { ActiveWorkflowRunner } from '@/ActiveWorkflowRunner';
|
||||
import * as Db from '@/Db';
|
||||
import * as GenericHelpers from '@/GenericHelpers';
|
||||
import * as Server from '@/Server';
|
||||
import { Server } from '@/Server';
|
||||
import { TestWebhooks } from '@/TestWebhooks';
|
||||
import { getAllInstalledPackages } from '@/CommunityNodes/packageModel';
|
||||
import { EDITOR_UI_DIST_DIR, GENERATED_STATIC_DIR } from '@/constants';
|
||||
@@ -62,6 +62,8 @@ export class Start extends BaseCommand {
|
||||
|
||||
protected activeWorkflowRunner: ActiveWorkflowRunner;
|
||||
|
||||
protected server = new Server();
|
||||
|
||||
/**
|
||||
* Opens the UI in browser
|
||||
*/
|
||||
@@ -208,6 +210,7 @@ export class Start extends BaseCommand {
|
||||
|
||||
async init() {
|
||||
await this.initCrashJournal();
|
||||
|
||||
await super.init();
|
||||
this.logger.info('Initializing n8n process');
|
||||
this.activeWorkflowRunner = Container.get(ActiveWorkflowRunner);
|
||||
@@ -351,7 +354,7 @@ export class Start extends BaseCommand {
|
||||
);
|
||||
}
|
||||
|
||||
await Server.start();
|
||||
await this.server.start();
|
||||
|
||||
// Start to get active workflows and run their triggers
|
||||
await this.activeWorkflowRunner.init();
|
||||
|
||||
Reference in New Issue
Block a user