mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
refactor(core): Use typedi to manage EventBus singletons (no-changelog) (#5795)
This commit is contained in:
committed by
GitHub
parent
be373bb859
commit
522c790817
@@ -1,3 +1,4 @@
|
||||
import { Container } from 'typedi';
|
||||
import express from 'express';
|
||||
import config from '@/config';
|
||||
import axios from 'axios';
|
||||
@@ -16,7 +17,7 @@ import {
|
||||
MessageEventBusDestinationSyslogOptions,
|
||||
MessageEventBusDestinationWebhookOptions,
|
||||
} from 'n8n-workflow';
|
||||
import { eventBus } from '@/eventbus';
|
||||
import { MessageEventBus } from '@/eventbus/MessageEventBus/MessageEventBus';
|
||||
import { EventMessageGeneric } from '@/eventbus/EventMessageClasses/EventMessageGeneric';
|
||||
import { MessageEventBusDestinationSyslog } from '@/eventbus/MessageEventBusDestination/MessageEventBusDestinationSyslog.ee';
|
||||
import { MessageEventBusDestinationWebhook } from '@/eventbus/MessageEventBusDestination/MessageEventBusDestinationWebhook.ee';
|
||||
@@ -64,6 +65,8 @@ 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);
|
||||
|
||||
Reference in New Issue
Block a user