refactor(core): Rename EventRelay to EventService (no-changelog) (#10110)

This commit is contained in:
Iván Ovejero
2024-07-19 12:55:38 +02:00
committed by GitHub
parent 222a0862bd
commit aba1c64500
36 changed files with 203 additions and 195 deletions

View File

@@ -37,7 +37,7 @@ import { PermissionChecker } from '@/UserManagement/PermissionChecker';
import { InternalHooks } from '@/InternalHooks';
import { Logger } from '@/Logger';
import { WorkflowStaticDataService } from '@/workflows/workflowStaticData.service';
import { EventRelay } from './eventbus/event-relay.service';
import { EventService } from './eventbus/event.service';
@Service()
export class WorkflowRunner {
@@ -53,7 +53,7 @@ export class WorkflowRunner {
private readonly workflowStaticDataService: WorkflowStaticDataService,
private readonly nodeTypes: NodeTypes,
private readonly permissionChecker: PermissionChecker,
private readonly eventRelay: EventRelay,
private readonly eventService: EventService,
) {
if (this.executionsMode === 'queue') {
this.jobQueue = Container.get(Queue);
@@ -147,7 +147,7 @@ export class WorkflowRunner {
await this.enqueueExecution(executionId, data, loadStaticData, realtime);
} else {
await this.runMainProcess(executionId, data, loadStaticData, restartExecutionId);
this.eventRelay.emit('workflow-pre-execute', { executionId, data });
this.eventService.emit('workflow-pre-execute', { executionId, data });
}
// only run these when not in queue mode or when the execution is manual,
@@ -166,7 +166,7 @@ export class WorkflowRunner {
executionData,
data.userId,
);
this.eventRelay.emit('workflow-post-execute', {
this.eventService.emit('workflow-post-execute', {
workflowId: data.workflowData.id,
workflowName: data.workflowData.name,
executionId,