refactor(core): Move methods from WorkflowHelpers into various workflow services (no-changelog) (#8348)
This commit is contained in:
committed by
GitHub
parent
ab52aaf7e9
commit
7cdbb424e3
@@ -1,10 +1,8 @@
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-argument */
|
||||
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
|
||||
|
||||
/* eslint-disable @typescript-eslint/no-shadow */
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
|
||||
|
||||
import { Container } from 'typedi';
|
||||
import type { IProcessMessage } from 'n8n-core';
|
||||
import { WorkflowExecute } from 'n8n-core';
|
||||
|
||||
@@ -29,6 +27,7 @@ import { fork } from 'child_process';
|
||||
|
||||
import { ActiveExecutions } from '@/ActiveExecutions';
|
||||
import config from '@/config';
|
||||
import { ExecutionRepository } from '@db/repositories/execution.repository';
|
||||
import { ExternalHooks } from '@/ExternalHooks';
|
||||
import type {
|
||||
IExecutionResponse,
|
||||
@@ -38,7 +37,6 @@ import type {
|
||||
} from '@/Interfaces';
|
||||
import { NodeTypes } from '@/NodeTypes';
|
||||
import type { Job, JobData, JobResponse } from '@/Queue';
|
||||
|
||||
import { Queue } from '@/Queue';
|
||||
import { decodeWebhookResponse } from '@/helpers/decodeWebhookResponse';
|
||||
import * as WorkflowHelpers from '@/WorkflowHelpers';
|
||||
@@ -47,10 +45,9 @@ import { generateFailedExecutionFromError } from '@/WorkflowHelpers';
|
||||
import { initErrorHandling } from '@/ErrorReporting';
|
||||
import { PermissionChecker } from '@/UserManagement/PermissionChecker';
|
||||
import { Push } from '@/push';
|
||||
import { Container } from 'typedi';
|
||||
import { InternalHooks } from './InternalHooks';
|
||||
import { ExecutionRepository } from '@db/repositories/execution.repository';
|
||||
import { Logger } from './Logger';
|
||||
import { InternalHooks } from '@/InternalHooks';
|
||||
import { Logger } from '@/Logger';
|
||||
import { WorkflowStaticDataService } from '@/workflows/workflowStaticData.service';
|
||||
|
||||
export class WorkflowRunner {
|
||||
logger: Logger;
|
||||
@@ -269,7 +266,8 @@ export class WorkflowRunner {
|
||||
): Promise<string> {
|
||||
const workflowId = data.workflowData.id;
|
||||
if (loadStaticData === true && workflowId) {
|
||||
data.workflowData.staticData = await WorkflowHelpers.getStaticDataById(workflowId);
|
||||
data.workflowData.staticData =
|
||||
await Container.get(WorkflowStaticDataService).getStaticDataById(workflowId);
|
||||
}
|
||||
|
||||
const nodeTypes = Container.get(NodeTypes);
|
||||
@@ -672,7 +670,8 @@ export class WorkflowRunner {
|
||||
const subprocess = fork(pathJoin(__dirname, 'WorkflowRunnerProcess.js'));
|
||||
|
||||
if (loadStaticData === true && workflowId) {
|
||||
data.workflowData.staticData = await WorkflowHelpers.getStaticDataById(workflowId);
|
||||
data.workflowData.staticData =
|
||||
await Container.get(WorkflowStaticDataService).getStaticDataById(workflowId);
|
||||
}
|
||||
|
||||
data.restartExecutionId = restartExecutionId;
|
||||
|
||||
Reference in New Issue
Block a user