mirror of
https://github.com/n8n-io/n8n.git
synced 2026-06-01 17:27:14 +02:00
refactor(core): Remove inferral of execution status (no-changelog) (#9829)
This commit is contained in:
parent
f0ee0a1655
commit
b5923020d7
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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';
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user