mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2026-08-29 14:50:36 +02:00
refactor(core): Move ExecutionLifecycleHooks to core (#13042)
This commit is contained in:
@@ -8,7 +8,7 @@ import { ARTIFICIAL_TASK_DATA } from '@/constants';
|
||||
import { ExecutionRepository } from '@/databases/repositories/execution.repository';
|
||||
import { NodeCrashedError } from '@/errors/node-crashed.error';
|
||||
import { WorkflowCrashedError } from '@/errors/workflow-crashed.error';
|
||||
import { getWorkflowHooksMain } from '@/execution-lifecycle/execution-lifecycle-hooks';
|
||||
import { getLifecycleHooksForRegularMain } from '@/execution-lifecycle/execution-lifecycle-hooks';
|
||||
import type { IExecutionResponse } from '@/interfaces';
|
||||
import { Push } from '@/push';
|
||||
|
||||
@@ -174,7 +174,7 @@ export class ExecutionRecoveryService {
|
||||
private async runHooks(execution: IExecutionResponse) {
|
||||
execution.data ??= { resultData: { runData: {} } };
|
||||
|
||||
const externalHooks = getWorkflowHooksMain(
|
||||
const lifecycleHooks = getLifecycleHooksForRegularMain(
|
||||
{
|
||||
userId: '',
|
||||
workflowData: execution.workflowData,
|
||||
@@ -196,6 +196,6 @@ export class ExecutionRecoveryService {
|
||||
status: execution.status,
|
||||
};
|
||||
|
||||
await externalHooks.executeHookFunctions('workflowExecuteAfter', [run]);
|
||||
await lifecycleHooks.runHook('workflowExecuteAfter', [run]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user