Task manager
- class app.src.task_manager.TaskManager
Bases:
objectManages tasks in the application.
- create_task(config: dict)
Creates a new task in the application.
Extra parameters:
‘task_id’: string - unique ID of the task,
‘task_class’: string - Class of the task,
‘task_type’: string - Type of the task,
- Parameters
config – Configuration of the task with the specified extra parameters
- Returns
the created task
- end()
Terminates all existing tasks.
- get_task(task_id)
Get an existing task reference.
- Parameters
task_id – ID of the task
- Returns
the requested task
- ping() Dict[str, bool]
Tests connectivity with each existing task.
- Returns
A dictionary {“task_id”: true/false}
- remove_task(task_id)
Terminates an existing task.
- Parameters
task_id – ID of the task