Task Manager Plugins¶
Plugins extend the TaskManager with additional behaviour by hooking into task lifecycle events.
A plugin implements the TaskManagerPlugin interface and is registered via TaskManager.with_plugin.
from fluid.scheduler import TaskScheduler
from fluid.scheduler.db import TaskDbPlugin
task_manager = TaskScheduler(...)
task_manager.with_plugin(TaskDbPlugin(db))
fluid.scheduler.TaskManagerPlugin
¶
fluid.scheduler.db.TaskDbPlugin
¶
Bases: TaskManagerPlugin
A plugin to store task runs in a database.
This plugin listens to task state changes and updates the database accordingly. It requires a CrudDB instance to perform database operations and allows customization of the table name and event tags.
You can use the skip_db tag to prevent database operations for specific tasks.
It can be used if the db extra is installed, and requires a compatible
database backend supported by CrudDB.
| PARAMETER | DESCRIPTION |
|---|---|
table_name
|
The name of the table to store task runs
TYPE:
|
tag
|
The tag for the plugin event registration
TYPE:
|
skip_db_tag
|
The tag to skip database operations
TYPE:
|