refactor(core): Simplify OrchestrationService (no-changelog) (#8364)
This commit is contained in:
@@ -22,7 +22,7 @@ import { InternalHooks } from '@/InternalHooks';
|
||||
import { OwnershipService } from '@/services/ownership.service';
|
||||
import { WorkflowHistoryService } from './workflowHistory/workflowHistory.service.ee';
|
||||
import { Logger } from '@/Logger';
|
||||
import { MultiMainSetup } from '@/services/orchestration/main/MultiMainSetup.ee';
|
||||
import { OrchestrationService } from '@/services/orchestration.service';
|
||||
import { BadRequestError } from '@/errors/response-errors/bad-request.error';
|
||||
import { NotFoundError } from '@/errors/response-errors/not-found.error';
|
||||
|
||||
@@ -38,7 +38,7 @@ export class WorkflowService {
|
||||
private readonly ownershipService: OwnershipService,
|
||||
private readonly tagService: TagService,
|
||||
private readonly workflowHistoryService: WorkflowHistoryService,
|
||||
private readonly multiMainSetup: MultiMainSetup,
|
||||
private readonly orchestrationService: OrchestrationService,
|
||||
private readonly externalHooks: ExternalHooks,
|
||||
private readonly activeWorkflowRunner: ActiveWorkflowRunner,
|
||||
) {}
|
||||
@@ -227,12 +227,12 @@ export class WorkflowService {
|
||||
}
|
||||
}
|
||||
|
||||
await this.multiMainSetup.init();
|
||||
await this.orchestrationService.init();
|
||||
|
||||
const newState = updatedWorkflow.active;
|
||||
|
||||
if (this.multiMainSetup.isEnabled && oldState !== newState) {
|
||||
await this.multiMainSetup.publish('workflowActiveStateChanged', {
|
||||
if (this.orchestrationService.isMultiMainSetupEnabled && oldState !== newState) {
|
||||
await this.orchestrationService.publish('workflowActiveStateChanged', {
|
||||
workflowId,
|
||||
oldState,
|
||||
newState,
|
||||
|
||||
Reference in New Issue
Block a user