avocado.core.task package

Submodules

avocado.core.task.runtime module

class avocado.core.task.runtime.RuntimeTask(task)

Bases: object

Task with extra status information on its life cycle status.

The avocado.core.nrunner.Task class contains information that is necessary to describe its persistence and execution by itself.

This class wraps a avocado.core.nrunner.Task, with extra information about its execution by a spawner within a state machine.

Instantiates a new RuntimeTask.

Parameters:task (avocado.core.nrunner.Task) – The task to keep additional information about
execution_timeout = None

Timeout limit for the completion of the task execution

spawner_handle = None

A handle that may be set by a spawner, and that may be spawner implementation specific, to keep track the task execution. This may be a PID, a container ID, a FQDN+PID etc.

spawning_result = None

The result of the spawning of a Task

status = None

Additional descriptive information about the task status

task = None

The avocado.core.nrunner.Task

avocado.core.task.statemachine module

class avocado.core.task.statemachine.TaskStateMachine(tasks)

Bases: object

Represents all phases that a task can go through its life.

complete
finished
lock
ready
requested
started
triaging
class avocado.core.task.statemachine.Worker(state_machine, spawner, max_triaging=None, max_running=None, task_timeout=None)

Bases: object

bootstrap()

Reads from requested, moves into triaging.

monitor()

Reads from started, moves into finished.

run()

Pushes Tasks forward and makes them do something with their lives.

start()

Reads from ready, moves into either: started or finished.

triage()

Reads from triaging, moves into either: ready or finished.

Module contents