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

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2023-03-29 20:38:47 +02:00
committed by GitHub
parent be373bb859
commit 522c790817
15 changed files with 145 additions and 154 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 eventBus.close();
await Container.get(MessageEventBus).close();
} catch (error) {
await this.exitWithCrash('There was an error shutting down n8n.', error);
}