Class ExecutorService

java.lang.Object
io.kestra.executor.ExecutorService

@Singleton public class ExecutorService extends Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected io.kestra.core.runners.FlowMetaStoreInterface
     
    protected io.kestra.core.queues.QueueInterface<io.kestra.core.models.executions.ExecutionKilled>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addWorkerTaskResult(io.kestra.core.runners.Executor executor, Supplier<io.kestra.core.models.flows.Flow> flow, io.kestra.core.runners.WorkerTaskResult workerTaskResult)
     
    void
    addWorkerTaskResults(io.kestra.core.runners.Executor executor, List<io.kestra.core.runners.WorkerTaskResult> workerTaskResults)
     
    boolean
    canBePurged(io.kestra.core.runners.Executor executor)
     
    protected io.kestra.core.runners.FlowMetaStoreInterface
     
    io.kestra.core.runners.Executor
    handleExecutionChangedSLA(io.kestra.core.runners.Executor executor)
    Handle flow ExecutionChangedSLA on an executor.
    void
    log(org.slf4j.Logger log, Boolean in, io.kestra.core.models.executions.Execution value)
     
    void
    log(org.slf4j.Logger log, Boolean in, io.kestra.core.models.executions.ExecutionKilledExecution value)
     
    void
    log(org.slf4j.Logger log, Boolean in, io.kestra.core.runners.Executor value)
     
    void
    log(org.slf4j.Logger log, Boolean in, io.kestra.core.runners.SubflowExecutionEnd value)
     
    void
    log(org.slf4j.Logger log, Boolean in, io.kestra.core.runners.SubflowExecutionResult value)
     
    void
    log(org.slf4j.Logger log, Boolean in, io.kestra.core.runners.WorkerJob value)
     
    void
    log(org.slf4j.Logger log, Boolean in, io.kestra.core.runners.WorkerTaskResult value)
     
    io.kestra.core.models.executions.Execution
    onNexts(io.kestra.core.models.executions.Execution execution, List<io.kestra.core.models.executions.TaskRun> nexts)
     
    io.kestra.core.runners.Executor
    process(io.kestra.core.runners.Executor executor)
     
    io.kestra.core.runners.ExecutionRunning
    processExecutionRunning(io.kestra.core.models.flows.FlowInterface flow, int runningCount, io.kestra.core.runners.ExecutionRunning executionRunning)
     
    io.kestra.core.runners.Executor
    processViolation(io.kestra.core.runners.RunContext runContext, io.kestra.core.runners.Executor executor, io.kestra.core.models.flows.sla.Violation violation)
    Process an SLA violation on an executor: - If behavior is FAIL or CANCEL: kill the execution, then return it with the new state.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • flowExecutorInterface

      protected io.kestra.core.runners.FlowMetaStoreInterface flowExecutorInterface
    • killQueue

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

    • ExecutorService

      public ExecutorService()
  • Method Details

    • flowExecutorInterface

      protected io.kestra.core.runners.FlowMetaStoreInterface flowExecutorInterface()
    • processExecutionRunning

      public io.kestra.core.runners.ExecutionRunning processExecutionRunning(io.kestra.core.models.flows.FlowInterface flow, int runningCount, io.kestra.core.runners.ExecutionRunning executionRunning)
    • process

      public io.kestra.core.runners.Executor process(io.kestra.core.runners.Executor executor)
    • onNexts

      public io.kestra.core.models.executions.Execution onNexts(io.kestra.core.models.executions.Execution execution, List<io.kestra.core.models.executions.TaskRun> nexts)
    • addWorkerTaskResults

      public void addWorkerTaskResults(io.kestra.core.runners.Executor executor, List<io.kestra.core.runners.WorkerTaskResult> workerTaskResults) throws io.kestra.core.exceptions.InternalException
      Throws:
      io.kestra.core.exceptions.InternalException
    • addWorkerTaskResult

      public void addWorkerTaskResult(io.kestra.core.runners.Executor executor, Supplier<io.kestra.core.models.flows.Flow> flow, io.kestra.core.runners.WorkerTaskResult workerTaskResult) throws io.kestra.core.exceptions.InternalException
      Throws:
      io.kestra.core.exceptions.InternalException
    • canBePurged

      public boolean canBePurged(io.kestra.core.runners.Executor executor)
    • log

      public void log(org.slf4j.Logger log, Boolean in, io.kestra.core.runners.WorkerJob value)
    • log

      public void log(org.slf4j.Logger log, Boolean in, io.kestra.core.runners.WorkerTaskResult value)
    • log

      public void log(org.slf4j.Logger log, Boolean in, io.kestra.core.runners.SubflowExecutionResult value)
    • log

      public void log(org.slf4j.Logger log, Boolean in, io.kestra.core.runners.SubflowExecutionEnd value)
    • log

      public void log(org.slf4j.Logger log, Boolean in, io.kestra.core.models.executions.Execution value)
    • log

      public void log(org.slf4j.Logger log, Boolean in, io.kestra.core.runners.Executor value)
    • log

      public void log(org.slf4j.Logger log, Boolean in, io.kestra.core.models.executions.ExecutionKilledExecution value)
    • handleExecutionChangedSLA

      public io.kestra.core.runners.Executor handleExecutionChangedSLA(io.kestra.core.runners.Executor executor) throws io.kestra.core.queues.QueueException
      Handle flow ExecutionChangedSLA on an executor. If there are SLA violations, it will take care of updating the execution based on the SLA behavior.
      Throws:
      io.kestra.core.queues.QueueException
      See Also:
    • processViolation

      public io.kestra.core.runners.Executor processViolation(io.kestra.core.runners.RunContext runContext, io.kestra.core.runners.Executor executor, io.kestra.core.models.flows.sla.Violation violation) throws io.kestra.core.queues.QueueException
      Process an SLA violation on an executor: - If behavior is FAIL or CANCEL: kill the execution, then return it with the new state. - If behavior is NONE: do nothing and return an unmodified executor.

      Then, if there are labels, they are added to the SLA (modifying the executor)

      Throws:
      io.kestra.core.queues.QueueException