mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-19 19:11: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
@@ -4,7 +4,7 @@ import config from '@/config';
|
||||
import { SettingsRepository } from '@db/repositories/settings.repository';
|
||||
import { UserRepository } from '@db/repositories/user.repository';
|
||||
import { ActiveWorkflowRunner } from '@/ActiveWorkflowRunner';
|
||||
import { eventBus } from '@/eventbus/MessageEventBus/MessageEventBus';
|
||||
import { MessageEventBus } from '@/eventbus';
|
||||
import { License } from '@/License';
|
||||
import { LICENSE_FEATURES, inE2ETests } from '@/constants';
|
||||
import { NoAuthRequired, Patch, Post, RestController } from '@/decorators';
|
||||
@@ -91,6 +91,7 @@ export class E2EController {
|
||||
private readonly cacheService: CacheService,
|
||||
private readonly push: Push,
|
||||
private readonly passwordUtility: PasswordUtility,
|
||||
private readonly eventBus: MessageEventBus,
|
||||
) {
|
||||
license.isFeatureEnabled = (feature: BooleanLicenseFeature) =>
|
||||
this.enabledFeatures[feature] ?? false;
|
||||
@@ -136,8 +137,8 @@ export class E2EController {
|
||||
}
|
||||
|
||||
private async resetLogStreaming() {
|
||||
for (const id in eventBus.destinations) {
|
||||
await eventBus.removeDestination(id, false);
|
||||
for (const id in this.eventBus.destinations) {
|
||||
await this.eventBus.removeDestination(id, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user