mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-24 20:24:05 -08:00
fix(core): Fix telemetry execution status for manual workflows executions (#5712)
fix telemetry execution status
This commit is contained in:
parent
f59b591c93
commit
a28396ee91
|
@ -284,6 +284,15 @@ export class InternalHooks implements IInternalHooksClass {
|
|||
properties.user_id = userId;
|
||||
}
|
||||
|
||||
let executionStatus: ExecutionStatus;
|
||||
if (runData?.status === 'crashed') {
|
||||
executionStatus = 'crashed';
|
||||
} else if (runData?.status === 'waiting' || runData?.data?.waitTill) {
|
||||
executionStatus = 'waiting';
|
||||
} else {
|
||||
executionStatus = properties.success ? 'success' : 'failed';
|
||||
}
|
||||
|
||||
if (runData !== undefined) {
|
||||
properties.execution_mode = runData.mode;
|
||||
properties.success = !!runData.finished;
|
||||
|
@ -342,7 +351,7 @@ export class InternalHooks implements IInternalHooksClass {
|
|||
const manualExecEventProperties: ITelemetryTrackProperties = {
|
||||
user_id: userId,
|
||||
workflow_id: workflow.id,
|
||||
status: properties.success ? 'success' : 'failed',
|
||||
status: executionStatus,
|
||||
executionStatus: runData?.status ?? 'unknown',
|
||||
error_message: properties.error_message as string,
|
||||
error_node_type: properties.error_node_type,
|
||||
|
@ -392,15 +401,6 @@ export class InternalHooks implements IInternalHooksClass {
|
|||
}
|
||||
}
|
||||
|
||||
let executionStatus: ExecutionStatus;
|
||||
if (runData?.status === 'crashed') {
|
||||
executionStatus = 'crashed';
|
||||
} else if (runData?.status === 'waiting' || runData?.data?.waitTill) {
|
||||
executionStatus = 'waiting';
|
||||
} else {
|
||||
executionStatus = properties.success ? 'success' : 'failed';
|
||||
}
|
||||
|
||||
promises.push(
|
||||
Db.collections.Execution.update(executionId, {
|
||||
status: executionStatus,
|
||||
|
|
Loading…
Reference in a new issue