mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-19 02:51:14 +00:00
fix(core): Support task runner in execute and execute-batch commands (#15147)
This commit is contained in:
@@ -69,6 +69,9 @@ export abstract class BaseCommand extends Command {
|
||||
/** Whether to init community packages (if enabled) */
|
||||
protected needsCommunityPackages = false;
|
||||
|
||||
/** Whether to init task runner (if enabled). */
|
||||
protected needsTaskRunner = false;
|
||||
|
||||
protected async loadModules() {
|
||||
for (const moduleName of this.modulesConfig.modules) {
|
||||
let preInitModule: ModulePreInit | undefined;
|
||||
@@ -156,6 +159,11 @@ export abstract class BaseCommand extends Command {
|
||||
await Container.get(CommunityPackagesService).checkForMissingPackages();
|
||||
}
|
||||
|
||||
if (this.needsTaskRunner && this.globalConfig.taskRunners.enabled) {
|
||||
const { TaskRunnerModule } = await import('@/task-runners/task-runner-module');
|
||||
await Container.get(TaskRunnerModule).start();
|
||||
}
|
||||
|
||||
// TODO: remove this after the cyclic dependencies around the event-bus are resolved
|
||||
Container.get(MessageEventBus);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user