mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-19 02:51:14 +00:00
refactor(core): Move all execution lifecycle telemetry events to lifecycle hooks (no-changelog) (#12816)
This commit is contained in:
committed by
GitHub
parent
49b8693d7c
commit
69a97bd32d
@@ -21,7 +21,6 @@ import { ActiveExecutions } from '@/active-executions';
|
||||
import config from '@/config';
|
||||
import { ExecutionRepository } from '@/databases/repositories/execution.repository';
|
||||
import { ExecutionNotFoundError } from '@/errors/execution-not-found-error';
|
||||
import { EventService } from '@/events/event.service';
|
||||
import {
|
||||
getWorkflowHooksMain,
|
||||
getWorkflowHooksWorkerExecuter,
|
||||
@@ -54,7 +53,6 @@ export class WorkflowRunner {
|
||||
private readonly workflowStaticDataService: WorkflowStaticDataService,
|
||||
private readonly nodeTypes: NodeTypes,
|
||||
private readonly permissionChecker: PermissionChecker,
|
||||
private readonly eventService: EventService,
|
||||
private readonly instanceSettings: InstanceSettings,
|
||||
private readonly manualExecutionService: ManualExecutionService,
|
||||
) {}
|
||||
@@ -169,7 +167,6 @@ export class WorkflowRunner {
|
||||
await this.enqueueExecution(executionId, data, loadStaticData, realtime);
|
||||
} else {
|
||||
await this.runMainProcess(executionId, data, loadStaticData, restartExecutionId);
|
||||
this.eventService.emit('workflow-pre-execute', { executionId, data });
|
||||
}
|
||||
|
||||
// only run these when not in queue mode or when the execution is manual,
|
||||
@@ -182,12 +179,6 @@ export class WorkflowRunner {
|
||||
const postExecutePromise = this.activeExecutions.getPostExecutePromise(executionId);
|
||||
postExecutePromise
|
||||
.then(async (executionData) => {
|
||||
this.eventService.emit('workflow-post-execute', {
|
||||
workflow: data.workflowData,
|
||||
executionId,
|
||||
userId: data.userId,
|
||||
runData: executionData,
|
||||
});
|
||||
if (this.externalHooks.exists('workflow.postExecute')) {
|
||||
try {
|
||||
await this.externalHooks.run('workflow.postExecute', [
|
||||
|
||||
Reference in New Issue
Block a user