refactor(core): Move ExecutionLifecycleHooks to core (#13042)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2025-02-07 18:16:37 +01:00
committed by GitHub
parent cae98e733d
commit d41ca832dc
24 changed files with 911 additions and 886 deletions
@@ -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]);
}
}