mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
feat(core): Setup backend modules (no-changelog) (#14084)
Co-authored-by: Guillaume Jacquart <jacquart.guillaume@gmail.com> Co-authored-by: Danny Martini <danny@n8n.io>
This commit is contained in:
committed by
GitHub
parent
c34ffd0e7c
commit
d80b49d6e5
@@ -8,6 +8,7 @@ import type {
|
||||
} from 'n8n-workflow';
|
||||
|
||||
import { ExecutionRepository } from '@/databases/repositories/execution.repository';
|
||||
import { ModuleRegistry } from '@/decorators/module';
|
||||
import { EventService } from '@/events/event.service';
|
||||
import { ExternalHooks } from '@/external-hooks';
|
||||
import { Push } from '@/push';
|
||||
@@ -394,11 +395,13 @@ export function getLifecycleHooksForScalingWorker(
|
||||
hookFunctionsPush(hooks, optionalParameters);
|
||||
}
|
||||
|
||||
Container.get(ModuleRegistry).registerLifecycleHooks(hooks);
|
||||
|
||||
return hooks;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns ExecutionLifecycleHooks instance for main process if workflow runs via worker
|
||||
* Returns ExecutionLifecycleHooks instance for main process in scaling mode.
|
||||
*/
|
||||
export function getLifecycleHooksForScalingMain(
|
||||
data: IWorkflowExecutionDataProcess,
|
||||
@@ -454,11 +457,13 @@ export function getLifecycleHooksForScalingMain(
|
||||
hooks.handlers.nodeExecuteBefore = [];
|
||||
hooks.handlers.nodeExecuteAfter = [];
|
||||
|
||||
Container.get(ModuleRegistry).registerLifecycleHooks(hooks);
|
||||
|
||||
return hooks;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns ExecutionLifecycleHooks instance for running the main workflow
|
||||
* Returns ExecutionLifecycleHooks instance for the main process in regular mode
|
||||
*/
|
||||
export function getLifecycleHooksForRegularMain(
|
||||
data: IWorkflowExecutionDataProcess,
|
||||
@@ -476,5 +481,6 @@ export function getLifecycleHooksForRegularMain(
|
||||
hookFunctionsSaveProgress(hooks, optionalParameters);
|
||||
hookFunctionsStatistics(hooks);
|
||||
hookFunctionsExternalHooks(hooks);
|
||||
Container.get(ModuleRegistry).registerLifecycleHooks(hooks);
|
||||
return hooks;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user