Task Tagging¶
Task Orchestrator allows you to tag tasks to categorize them. This is useful when you have multiple types of tasks, such as development, testing, or production tasks, and you want to execute only a subset based on tags.
—
Executing Tasks by Tag¶
You can execute only tasks with specific tags using the tags parameter
of the executor:
if __name__ == "__main__":
# Execute only tasks tagged with "prod"
TaskExecutor.execute(tags=("prod",))
Expected Output¶
Prod task executed
—
Notes¶
When a tagged task depends on another task (tagged or untagged), the executor automatically includes all dependencies in the execution plan.
This ensures that dependencies are never skipped, even if they have a different tag.
Tags allow selective execution without modifying the workflow code.