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:
कारतोफ्फेलस्क्रिप्ट™
2023-05-10 08:27:04 +00:00
committed by GitHub
parent e3f47994b1
commit 9e7b9fb443
9 changed files with 184 additions and 153 deletions

View File

@@ -16,6 +16,8 @@ export class Webhook extends BaseCommand {
help: flags.help({ char: 'h' }),
};
protected server = new WebhookServer();
/**
* Stops n8n in a graceful way.
* Make for example sure that all the webhooks from third party services
@@ -81,7 +83,7 @@ export class Webhook extends BaseCommand {
async run() {
await Container.get(Queue).init();
await new WebhookServer().start();
await this.server.start();
this.logger.info('Webhook listener waiting for requests.');
// Make sure that the process does not close