Managers#
Task manager for executing and coordinating multiple tasks with optional parallelization.
- class core_mixins.managers.tasks_manager.TasksManager(tasks: List[ITask])[source]#
Bases:
objectIt manages the execution for the registered tasks
- execute(task_name: str | None = None, parallelize: bool | None = False, processes: int | None = None) List[TaskResult] | TaskResult | None[source]#
Execute all registered tasks. An exception in one task should not stop the execution of the others…
Example of results:
[ TaskResult(status=TaskStatus.SUCCESS, result=...), TaskResult(status=TaskStatus.ERROR, error=...) ]
- Parameters:
- Returns:
The list of the execution results.
- Return type:
List[TaskResult]