doot.control.runner.util

Classes

_RunnerCtx_m

Mixin for a runner that adds ctx manager functionality

_RunnerHandlers_m

Mixin for runners with default handlers

Module Contents

class doot.control.runner.util._RunnerCtx_m(*args, **kwargs)[source]

Mixin for a runner that adds ctx manager functionality

_signal_failure: jgdv.Maybe[doot.errors.DootError]
_enter_msg
_exit_msg
_finish() None[source]

finish running tasks, summarizing results using the reporter separate from __exit__ to allow it to be overridden

Return type:

None

class doot.control.runner.util._RunnerHandlers_m[source]

Mixin for runners with default handlers

_signal_failure: jgdv.Maybe[doot.errors.DootError]
handle_success(
task: _RunnerHandlers_m.handle_success.T,
) _RunnerHandlers_m.handle_success.T[source]

The basic success handler. just informs the tracker of the success

Parameters:

task (_RunnerHandlers_m.handle_success.T)

Return type:

_RunnerHandlers_m.handle_success.T

handle_failure(failure: Exception) None[source]

The basic failure handler. Triggers a breakpoint on Interrupt, otherwise informs the tracker of the failure.

Halts any failed or errored tasks, which propagates to any successors Fails any DootErrors, TrackingErrors, and non-doot errors

the tracker handle’s clearing itself and shutting down

Parameters:

failure (Exception)

Return type:

None

notify_artifact(
art: doot.workflow.TaskArtifact,
) None[source]

A No-op for when the tracker gives an artifact

Parameters:

art (doot.workflow.TaskArtifact)

Return type:

None

sleep_after(
task: jgdv.Maybe[doot.workflow._interface.Task_p | doot.workflow._interface.Artifact_i],
) None[source]

The runner’s sleep method, which spaces out tasks

Parameters:

task (jgdv.Maybe[doot.workflow._interface.Task_p | doot.workflow._interface.Artifact_i])

Return type:

None