mirror of
https://github.com/kestra-io/kestra.git
synced 2025-12-19 18:05:41 -05:00
fix(core): declare the FlowExecutor as a bean (#3389)
This commit is contained in:
@@ -3,12 +3,14 @@ package io.kestra.core.runners;
|
||||
import io.kestra.core.models.flows.Flow;
|
||||
import io.kestra.core.repositories.FlowRepositoryInterface;
|
||||
import io.kestra.core.services.FlowListenersInterface;
|
||||
import jakarta.inject.Singleton;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
@Singleton
|
||||
public class DefaultFlowExecutor implements FlowExecutorInterface {
|
||||
private final FlowRepositoryInterface flowRepositoryInterface;
|
||||
@Setter
|
||||
|
||||
@@ -22,7 +22,6 @@ import io.kestra.core.models.triggers.multipleflows.MultipleConditionStorageInte
|
||||
import io.kestra.core.queues.QueueFactoryInterface;
|
||||
import io.kestra.core.queues.QueueInterface;
|
||||
import io.kestra.core.repositories.FlowRepositoryInterface;
|
||||
import io.kestra.core.runners.DefaultFlowExecutor;
|
||||
import io.kestra.core.runners.ExecutableUtils;
|
||||
import io.kestra.core.runners.ExecutionQueued;
|
||||
import io.kestra.core.runners.ExecutionRunning;
|
||||
@@ -233,8 +232,6 @@ public class JdbcExecutor implements ExecutorInterface, Service {
|
||||
|
||||
Await.until(() -> this.allFlows != null, Duration.ofMillis(100), Duration.ofMinutes(5));
|
||||
|
||||
applicationContext.registerSingleton(new DefaultFlowExecutor(flowListeners, this.flowRepository));
|
||||
|
||||
this.executionQueue.receive(Executor.class, this::executionQueue);
|
||||
this.workerTaskResultQueue.receive(Executor.class, this::workerTaskResultQueue);
|
||||
this.killQueue.receive(Executor.class, this::killQueue);
|
||||
|
||||
@@ -111,8 +111,6 @@ public class MemoryExecutor implements ExecutorInterface {
|
||||
flowListeners.run();
|
||||
flowListeners.listen(flows -> this.allFlows = flows);
|
||||
|
||||
applicationContext.registerSingleton(new DefaultFlowExecutor(flowListeners, this.flowRepository));
|
||||
|
||||
this.executionQueue.receive(MemoryExecutor.class, this::executionQueue);
|
||||
this.workerTaskResultQueue.receive(MemoryExecutor.class, this::workerTaskResultQueue);
|
||||
this.killQueue.receive(MemoryExecutor.class, this::killQueue);
|
||||
|
||||
Reference in New Issue
Block a user