mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-19 11:01:15 +00:00
refactor(core): Use type-safe event emitters (no-changelog) (#10234)
This commit is contained in:
committed by
GitHub
parent
99dc56c7a1
commit
1fca3af335
@@ -525,17 +525,16 @@ function hookFunctionsSave(): IWorkflowExecuteHooks {
|
||||
);
|
||||
}
|
||||
} finally {
|
||||
workflowStatisticsService.emit(
|
||||
'workflowExecutionCompleted',
|
||||
this.workflowData,
|
||||
workflowStatisticsService.emit('workflowExecutionCompleted', {
|
||||
workflowData: this.workflowData,
|
||||
fullRunData,
|
||||
);
|
||||
});
|
||||
}
|
||||
},
|
||||
],
|
||||
nodeFetchedData: [
|
||||
async (workflowId: string, node: INode) => {
|
||||
workflowStatisticsService.emit('nodeFetchedData', workflowId, node);
|
||||
workflowStatisticsService.emit('nodeFetchedData', { workflowId, node });
|
||||
},
|
||||
],
|
||||
};
|
||||
@@ -636,11 +635,10 @@ function hookFunctionsSaveWorker(): IWorkflowExecuteHooks {
|
||||
this.retryOf,
|
||||
);
|
||||
} finally {
|
||||
workflowStatisticsService.emit(
|
||||
'workflowExecutionCompleted',
|
||||
this.workflowData,
|
||||
workflowStatisticsService.emit('workflowExecutionCompleted', {
|
||||
workflowData: this.workflowData,
|
||||
fullRunData,
|
||||
);
|
||||
});
|
||||
}
|
||||
},
|
||||
async function (this: WorkflowHooks, runData: IRun): Promise<void> {
|
||||
@@ -676,7 +674,7 @@ function hookFunctionsSaveWorker(): IWorkflowExecuteHooks {
|
||||
],
|
||||
nodeFetchedData: [
|
||||
async (workflowId: string, node: INode) => {
|
||||
workflowStatisticsService.emit('nodeFetchedData', workflowId, node);
|
||||
workflowStatisticsService.emit('nodeFetchedData', { workflowId, node });
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user