mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
refactor(core): Use DI for eventBus code - Part 1 (no-changelog) (#8434)
This commit is contained in:
committed by
GitHub
parent
3cc0f81c02
commit
7c49004018
@@ -67,7 +67,7 @@ import { setupAuthMiddlewares } from './middlewares';
|
||||
import { isLdapEnabled } from './Ldap/helpers';
|
||||
import { AbstractServer } from './AbstractServer';
|
||||
import { PostHogClient } from './posthog';
|
||||
import { eventBus } from './eventbus';
|
||||
import { MessageEventBus } from '@/eventbus';
|
||||
import { InternalHooks } from './InternalHooks';
|
||||
import { License } from './License';
|
||||
import { SamlController } from './sso/saml/routes/saml.controller.ee';
|
||||
@@ -416,10 +416,8 @@ export class Server extends AbstractServer {
|
||||
// ----------------------------------------
|
||||
// EventBus Setup
|
||||
// ----------------------------------------
|
||||
|
||||
if (!eventBus.isInitialized) {
|
||||
await eventBus.initialize();
|
||||
}
|
||||
const eventBus = Container.get(MessageEventBus);
|
||||
await eventBus.initialize();
|
||||
|
||||
if (this.endpointPresetCredentials !== '') {
|
||||
// POST endpoint to set preset credentials
|
||||
|
||||
Reference in New Issue
Block a user