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

@@ -1,4 +1,3 @@
import { Container } from 'typedi';
import express from 'express';
import config from '@/config';
import axios from 'axios';
@@ -17,7 +16,7 @@ import {
MessageEventBusDestinationSyslogOptions,
MessageEventBusDestinationWebhookOptions,
} from 'n8n-workflow';
import { MessageEventBus } from '@/eventbus/MessageEventBus/MessageEventBus';
import { eventBus } from '@/eventbus';
import { EventMessageGeneric } from '@/eventbus/EventMessageClasses/EventMessageGeneric';
import { MessageEventBusDestinationSyslog } from '@/eventbus/MessageEventBusDestination/MessageEventBusDestinationSyslog.ee';
import { MessageEventBusDestinationWebhook } from '@/eventbus/MessageEventBusDestination/MessageEventBusDestinationWebhook.ee';
@@ -65,8 +64,6 @@ const testSentryDestination: MessageEventBusDestinationSentryOptions = {
subscribedEvents: ['n8n.test.message', 'n8n.audit.user.updated'],
};
const eventBus = Container.get(MessageEventBus);
async function confirmIdInAll(id: string) {
const sent = await eventBus.getEventsAll();
expect(sent.length).toBeGreaterThan(0);