Skip to content

Universal

The planners produce these tasks, and the executors execute them.

amsdal_glue.tasks.ChainTask dataclass

Bases: Task

Represents a chain of tasks to be executed sequentially.

Attributes:

Name Type Description
tasks list[Task]

The list of tasks to be executed.

final_task Task | None

The final task to be executed after the chain of tasks.

Methods:

Name Description
execute

str | None, lock_id: str | None) -> None: Executes the chain of tasks sequentially using the SequentialExecutor.

item

Returns the item of the final task or the last task in the chain.

result

Returns the result of the final task or the last task in the chain.

execute

execute(transaction_id, lock_id)

Executes the chain of tasks sequentially using the SequentialExecutor.

Parameters:

Name Type Description Default
transaction_id str | None

The transaction ID to be used during execution.

required
lock_id str | None

The lock ID to be used during execution.

required

item property

item

Returns the item of the final task or the last task in the chain.

Returns:

Name Type Description
Any Any

The item of the final task or the last task in the chain.

result property

result

Returns the result of the final task or the last task in the chain.

Returns:

Name Type Description
Any Any

The result of the final task or the last task in the chain.

amsdal_glue.tasks.GroupTask dataclass

Bases: Task

Represents a group of tasks to be executed in parallel.

Attributes:

Name Type Description
tasks list[Task]

The list of tasks to be executed.

Methods:

Name Description
execute

str | None, lock_id: str | None) -> None: Executes the group of tasks in parallel using the ParallelExecutor.

item

Returns the items of the tasks in the group.

result

Returns the results of the tasks in the group.

execute

execute(transaction_id, lock_id)

Executes the group of tasks in parallel using the ParallelExecutor.

Parameters:

Name Type Description Default
transaction_id str | None

The transaction ID to be used during execution.

required
lock_id str | None

The lock ID to be used during execution.

required

item property

item

Returns the items of the tasks in the group.

Returns:

Name Type Description
Any Any

The items of the tasks in the group.

result property

result

Returns the results of the tasks in the group.

Returns:

Name Type Description
Any Any

The results of the tasks in the group.