Task Manager¶
It can be imported from fluid.scheduler
:
fluid.scheduler.TaskManager
¶
The task manager is the main entry point for managing tasks
Source code in fluid/scheduler/consumer.py
enter_async_context
async
¶
execute
async
¶
Execute a task and wait for it to finish
on_shutdown
async
¶
execute_sync
¶
register_task
¶
Register a task with the task manager
Only tasks registered can be executed by a task manager
queue
async
¶
Queue a task for execution
This methods fires two events:
- queue: when the task is about to be queued
- queued: after the task is queued
Source code in fluid/scheduler/consumer.py
create_task_run
¶
Create a TaskRun in init
state
Source code in fluid/scheduler/consumer.py
register_from_module
¶
register_async_handler
¶
Register an async handler for a given event
This method is a no op for a TaskManager that is not a worker
unregister_async_handler
¶
Unregister an async handler for a given event
This method is a no op for a TaskManager that is not a worker
cli
¶
Create the task manager command line interface