Class JdbcExecutor

java.lang.Object
io.kestra.jdbc.runner.JdbcExecutor
All Implemented Interfaces:
io.kestra.core.runners.ExecutorInterface, io.kestra.core.server.Service, Closeable, AutoCloseable, Runnable

@Singleton @JdbcRunnerEnabled public class JdbcExecutor extends Object implements io.kestra.core.runners.ExecutorInterface, io.kestra.core.server.Service
  • Nested Class Summary

    Nested classes/interfaces inherited from interface io.kestra.core.server.Service

    io.kestra.core.server.Service.ServiceState, io.kestra.core.server.Service.ServiceType
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected List<io.kestra.core.models.flows.Flow>
     
    protected io.kestra.core.services.FlowListenersInterface
     
    protected io.kestra.core.queues.QueueInterface<io.kestra.core.models.executions.ExecutionKilled>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    JdbcExecutor(JdbcServiceLivenessCoordinator serviceLivenessCoordinator, io.kestra.core.repositories.FlowRepositoryInterface flowRepository, AbstractJdbcFlowTopologyRepository flowTopologyRepository, io.micronaut.context.event.ApplicationEventPublisher<io.kestra.core.server.ServiceStateChangeEvent> eventPublisher)
    Creates a new JdbcExecutor instance.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    io.kestra.core.server.Service.ServiceState
    io.kestra.core.server.Service.ServiceType
    void
    run()
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface io.kestra.core.server.Service

    getMetrics, skipGracefulTermination, unwrap
  • Field Details

    • killQueue

      @Inject @Named("executionKilledQueue") protected io.kestra.core.queues.QueueInterface<io.kestra.core.models.executions.ExecutionKilled> killQueue
    • flowListeners

      @Inject protected io.kestra.core.services.FlowListenersInterface flowListeners
    • allFlows

      protected List<io.kestra.core.models.flows.Flow> allFlows
  • Constructor Details

    • JdbcExecutor

      @Inject public JdbcExecutor(@Nullable JdbcServiceLivenessCoordinator serviceLivenessCoordinator, io.kestra.core.repositories.FlowRepositoryInterface flowRepository, AbstractJdbcFlowTopologyRepository flowTopologyRepository, io.micronaut.context.event.ApplicationEventPublisher<io.kestra.core.server.ServiceStateChangeEvent> eventPublisher)
      Creates a new JdbcExecutor instance. Both constructor and field injection are used to force Micronaut to respect order when invoking pre-destroy order.
      Parameters:
      serviceLivenessCoordinator - The JdbcServiceLivenessCoordinator.
      flowRepository - The FlowRepositoryInterface.
      flowTopologyRepository - The AbstractJdbcFlowTopologyRepository.
      eventPublisher - The ApplicationEventPublisher.
  • Method Details

    • run

      public void run()
      Specified by:
      run in interface Runnable
    • close

      @PreDestroy public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Specified by:
      close in interface io.kestra.core.server.Service
    • getId

      public String getId()
      Specified by:
      getId in interface io.kestra.core.server.Service
    • getType

      public io.kestra.core.server.Service.ServiceType getType()
      Specified by:
      getType in interface io.kestra.core.server.Service
    • getState

      public io.kestra.core.server.Service.ServiceState getState()
      Specified by:
      getState in interface io.kestra.core.server.Service