diff --git a/packages/cli/src/executions/execution.service.ts b/packages/cli/src/executions/execution.service.ts index b0c4f11e164b0..6ff642acff8f8 100644 --- a/packages/cli/src/executions/execution.service.ts +++ b/packages/cli/src/executions/execution.service.ts @@ -9,7 +9,6 @@ import type { ExecutionStatus, } from 'n8n-workflow'; import { - ErrorReporterProxy as EventReporter, ApplicationError, ExecutionStatusList, Workflow, @@ -27,7 +26,6 @@ import { NodeTypes } from '@/NodeTypes'; import { Queue } from '@/Queue'; import type { ExecutionRequest, ExecutionSummaries } from './execution.types'; import { WorkflowRunner } from '@/WorkflowRunner'; -import { getStatusUsingPreviousExecutionStatusMethod } from './executionHelpers'; import type { IGetExecutionsQueryFilter } from '@db/repositories/execution.repository'; import { ExecutionRepository } from '@db/repositories/execution.repository'; import { WorkflowRepository } from '@db/repositories/workflow.repository'; @@ -111,12 +109,6 @@ export class ExecutionService { return undefined; } - if (!execution.status) { - const { data, workflowData, ...rest } = execution; - EventReporter.info('Detected `null` execution status', { extra: { execution: rest } }); - execution.status = getStatusUsingPreviousExecutionStatusMethod(execution); - } - return execution; } diff --git a/packages/cli/src/executions/executionHelpers.ts b/packages/cli/src/executions/executionHelpers.ts deleted file mode 100644 index 21b9cf086554f..0000000000000 --- a/packages/cli/src/executions/executionHelpers.ts +++ /dev/null @@ -1,18 +0,0 @@ -import type { ExecutionStatus } from 'n8n-workflow'; -import type { IExecutionFlattedDb, IExecutionResponse } from '@/Interfaces'; - -export function getStatusUsingPreviousExecutionStatusMethod( - execution: IExecutionFlattedDb | IExecutionResponse, -): ExecutionStatus { - if (execution.waitTill) { - return 'waiting'; - } else if (execution.stoppedAt === undefined) { - return 'running'; - } else if (execution.finished) { - return 'success'; - } else if (execution.stoppedAt !== null) { - return 'error'; - } else { - return 'unknown'; - } -}