mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
fix(core): Fix execution status filters (#5533)
* fix status filters * fix countfilter * add migrations to backfill status * fix migrations
This commit is contained in:
committed by
GitHub
parent
52f740b9e8
commit
17eff4d7d6
18
packages/cli/src/executions/executionHelpers.ts
Normal file
18
packages/cli/src/executions/executionHelpers.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import type { IExecutionFlattedDb } from '../Interfaces';
|
||||
import type { ExecutionStatus } from 'n8n-workflow';
|
||||
|
||||
export function getStatusUsingPreviousExecutionStatusMethod(
|
||||
execution: IExecutionFlattedDb,
|
||||
): 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 'failed';
|
||||
} else {
|
||||
return 'unknown';
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user