refactor(core): Move methods from WorkflowHelpers into various workflow services (no-changelog) (#8348)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2024-01-17 10:16:13 +01:00
committed by GitHub
parent ab52aaf7e9
commit 7cdbb424e3
21 changed files with 896 additions and 802 deletions

View File

@@ -68,6 +68,7 @@ import { saveExecutionProgress } from './executionLifecycleHooks/saveExecutionPr
import { WorkflowStaticDataService } from './workflows/workflowStaticData.service';
import { WorkflowRepository } from './databases/repositories/workflow.repository';
import { UrlService } from './services/url.service';
import { WorkflowExecutionService } from './workflows/workflowExecution.service';
const ERROR_TRIGGER_TYPE = config.getEnv('nodes.errorTriggerType');
@@ -194,7 +195,11 @@ export function executeErrorWorkflow(
Container.get(OwnershipService)
.getWorkflowOwnerCached(workflowId)
.then((user) => {
void WorkflowHelpers.executeErrorWorkflow(errorWorkflow, workflowErrorData, user);
void Container.get(WorkflowExecutionService).executeErrorWorkflow(
errorWorkflow,
workflowErrorData,
user,
);
})
.catch((error: Error) => {
ErrorReporter.error(error);
@@ -218,7 +223,11 @@ export function executeErrorWorkflow(
void Container.get(OwnershipService)
.getWorkflowOwnerCached(workflowId)
.then((user) => {
void WorkflowHelpers.executeErrorWorkflow(workflowId, workflowErrorData, user);
void Container.get(WorkflowExecutionService).executeErrorWorkflow(
workflowId,
workflowErrorData,
user,
);
});
}
}