mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 10:31:15 +00:00
feat(core): Workflow Execution Statistics (#4200)
Add recording and reporting of workflow execution statistics
This commit is contained in:
@@ -15,12 +15,13 @@
|
||||
/* eslint-disable @typescript-eslint/no-unused-vars */
|
||||
/* eslint-disable func-names */
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
|
||||
import { BinaryDataManager, UserSettings, WorkflowExecute } from 'n8n-core';
|
||||
import { BinaryDataManager, eventEmitter, UserSettings, WorkflowExecute } from 'n8n-core';
|
||||
|
||||
import {
|
||||
IDataObject,
|
||||
IExecuteData,
|
||||
IExecuteWorkflowInfo,
|
||||
INode,
|
||||
INodeExecutionData,
|
||||
INodeParameters,
|
||||
IRun,
|
||||
@@ -648,9 +649,20 @@ function hookFunctionsSave(parentProcessMode?: string): IWorkflowExecuteHooks {
|
||||
this.retryOf,
|
||||
);
|
||||
}
|
||||
} finally {
|
||||
eventEmitter.emit(
|
||||
eventEmitter.types.workflowExecutionCompleted,
|
||||
this.workflowData,
|
||||
fullRunData,
|
||||
);
|
||||
}
|
||||
},
|
||||
],
|
||||
nodeFetchedData: [
|
||||
async (workflowId: string, node: INode) => {
|
||||
eventEmitter.emit(eventEmitter.types.nodeFetchedData, workflowId, node);
|
||||
},
|
||||
],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -742,9 +754,20 @@ function hookFunctionsSaveWorker(): IWorkflowExecuteHooks {
|
||||
this.executionId,
|
||||
this.retryOf,
|
||||
);
|
||||
} finally {
|
||||
eventEmitter.emit(
|
||||
eventEmitter.types.workflowExecutionCompleted,
|
||||
this.workflowData,
|
||||
fullRunData,
|
||||
);
|
||||
}
|
||||
},
|
||||
],
|
||||
nodeFetchedData: [
|
||||
async (workflowId: string, node: INode) => {
|
||||
eventEmitter.emit(eventEmitter.types.nodeFetchedData, workflowId, node);
|
||||
},
|
||||
],
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user