Search in sources :

Example 1 with FlowSource

use of io.kestra.core.models.flows.FlowSource in project kestra by kestra-io.

the class RestoreQueueService method flows.

public int flows(boolean noRecreate) {
    FlowRepositoryInterface flowRepository = applicationContext.getBean(FlowRepositoryInterface.class);
    List<Flow> flows = flowRepository.findAll().stream().flatMap(flow -> flowRepository.findRevisions(flow.getNamespace(), flow.getId()).stream()).filter(flow -> !(flow instanceof FlowSource)).collect(Collectors.toList());
    return this.send(flows, QueueFactoryInterface.FLOW_NAMED, Flow.class, noRecreate);
}
Also used : TemplateRepositoryInterface(io.kestra.core.repositories.TemplateRepositoryInterface) QueueFactoryInterface(io.kestra.core.queues.QueueFactoryInterface) KafkaAdminService(io.kestra.runner.kafka.services.KafkaAdminService) SneakyThrows(lombok.SneakyThrows) QueueInterface(io.kestra.core.queues.QueueInterface) Qualifiers(io.micronaut.inject.qualifiers.Qualifiers) Singleton(jakarta.inject.Singleton) Trigger(io.kestra.core.models.triggers.Trigger) FlowSource(io.kestra.core.models.flows.FlowSource) Collectors(java.util.stream.Collectors) ArrayList(java.util.ArrayList) List(java.util.List) ApplicationContext(io.micronaut.context.ApplicationContext) TriggerRepositoryInterface(io.kestra.core.repositories.TriggerRepositoryInterface) Optional(java.util.Optional) Flow(io.kestra.core.models.flows.Flow) Template(io.kestra.core.models.templates.Template) Inject(jakarta.inject.Inject) FlowRepositoryInterface(io.kestra.core.repositories.FlowRepositoryInterface) FlowSource(io.kestra.core.models.flows.FlowSource) FlowRepositoryInterface(io.kestra.core.repositories.FlowRepositoryInterface) Flow(io.kestra.core.models.flows.Flow)

Aggregations

Flow (io.kestra.core.models.flows.Flow)1 FlowSource (io.kestra.core.models.flows.FlowSource)1 Template (io.kestra.core.models.templates.Template)1 Trigger (io.kestra.core.models.triggers.Trigger)1 QueueFactoryInterface (io.kestra.core.queues.QueueFactoryInterface)1 QueueInterface (io.kestra.core.queues.QueueInterface)1 FlowRepositoryInterface (io.kestra.core.repositories.FlowRepositoryInterface)1 TemplateRepositoryInterface (io.kestra.core.repositories.TemplateRepositoryInterface)1 TriggerRepositoryInterface (io.kestra.core.repositories.TriggerRepositoryInterface)1 KafkaAdminService (io.kestra.runner.kafka.services.KafkaAdminService)1 ApplicationContext (io.micronaut.context.ApplicationContext)1 Qualifiers (io.micronaut.inject.qualifiers.Qualifiers)1 Inject (jakarta.inject.Inject)1 Singleton (jakarta.inject.Singleton)1 ArrayList (java.util.ArrayList)1 List (java.util.List)1 Optional (java.util.Optional)1 Collectors (java.util.stream.Collectors)1 SneakyThrows (lombok.SneakyThrows)1