fix(core): Assign properties.success earlier to set executionStatus correctly (#5773)

assign properties.success earlier
This commit is contained in:
Michael Auerswald 2023-03-24 12:53:43 +01:00 committed by GitHub
parent e67ad29625
commit d33a1ac1e9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -284,6 +284,8 @@ export class InternalHooks implements IInternalHooksClass {
properties.user_id = userId; properties.user_id = userId;
} }
properties.success = !!runData?.finished;
let executionStatus: ExecutionStatus; let executionStatus: ExecutionStatus;
if (runData?.status === 'crashed') { if (runData?.status === 'crashed') {
executionStatus = 'crashed'; executionStatus = 'crashed';
@ -295,7 +297,6 @@ export class InternalHooks implements IInternalHooksClass {
if (runData !== undefined) { if (runData !== undefined) {
properties.execution_mode = runData.mode; properties.execution_mode = runData.mode;
properties.success = !!runData.finished;
properties.is_manual = runData.mode === 'manual'; properties.is_manual = runData.mode === 'manual';
let nodeGraphResult: INodesGraphResult | null = null; let nodeGraphResult: INodesGraphResult | null = null;