Package io.kestra.executor
Class ExecutorService
java.lang.Object
io.kestra.executor.ExecutorService
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected io.kestra.core.runners.FlowMetaStoreInterfaceprotected io.kestra.core.queues.QueueInterface<io.kestra.core.models.executions.ExecutionKilled> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddWorkerTaskResult(io.kestra.core.runners.Executor executor, Supplier<io.kestra.core.models.flows.Flow> flow, io.kestra.core.runners.WorkerTaskResult workerTaskResult) voidaddWorkerTaskResults(io.kestra.core.runners.Executor executor, List<io.kestra.core.runners.WorkerTaskResult> workerTaskResults) booleancanBePurged(io.kestra.core.runners.Executor executor) protected io.kestra.core.runners.FlowMetaStoreInterfaceio.kestra.core.runners.ExecutorhandleExecutionChangedSLA(io.kestra.core.runners.Executor executor) Handle flow ExecutionChangedSLA on an executor.voidvoidlog(org.slf4j.Logger log, Boolean in, io.kestra.core.models.executions.ExecutionKilledExecution value) voidvoidvoidvoidvoidio.kestra.core.models.executions.ExecutiononNexts(io.kestra.core.models.executions.Execution execution, List<io.kestra.core.models.executions.TaskRun> nexts) io.kestra.core.runners.Executorprocess(io.kestra.core.runners.Executor executor) io.kestra.core.runners.ExecutionRunningprocessExecutionRunning(io.kestra.core.models.flows.FlowInterface flow, int runningCount, io.kestra.core.runners.ExecutionRunning executionRunning) io.kestra.core.runners.ExecutorprocessViolation(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.
-
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
-
log
-
log
public void log(org.slf4j.Logger log, Boolean in, io.kestra.core.runners.SubflowExecutionResult value) -
log
-
log
-
log
-
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
-