refactor: Revert "refactor(core): Use typedi to manage EventBus singletons (#5795)" (no-changelog) (#5825)

Revert "refactor(core): Use typedi to manage EventBus singletons (no-changelog) (#5795)"

This reverts commit 522c790817.
This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2023-03-30 09:59:04 +02:00
committed by GitHub
parent 6c35ffa82c
commit 58fda255fe
15 changed files with 154 additions and 145 deletions

View File

@@ -25,10 +25,10 @@ import * as Server from '@/Server';
import { TestWebhooks } from '@/TestWebhooks';
import { getAllInstalledPackages } from '@/CommunityNodes/packageModel';
import { EDITOR_UI_DIST_DIR, GENERATED_STATIC_DIR } from '@/constants';
import { eventBus } from '@/eventbus';
import { BaseCommand } from './BaseCommand';
import { InternalHooks } from '@/InternalHooks';
import { License } from '@/License';
import { MessageEventBus } from '@/eventbus';
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-var-requires
const open = require('open');
@@ -133,7 +133,7 @@ export class Start extends BaseCommand {
}
//finally shut down Event Bus
await Container.get(MessageEventBus).close();
await eventBus.close();
} catch (error) {
await this.exitWithCrash('There was an error shutting down n8n.', error);
}