set_task_run_state
Update the execution status of a Prefect workflow task run by setting it to states like SCHEDULED, RUNNING, COMPLETED, or FAILED to manage task lifecycle and track progress.
Instructions
Set a task run's state.
Args: task_run_id: The task run UUID state: The new state to set (e.g., "SCHEDULED", "RUNNING", "COMPLETED", "FAILED") message: An optional message explaining the state change
Returns: Result of the state change operation
Input Schema
Name | Required | Description | Default |
---|---|---|---|
message | No | ||
state | Yes | ||
task_run_id | Yes |
Input Schema (JSON Schema)
{
"properties": {
"message": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Message"
},
"state": {
"title": "State",
"type": "string"
},
"task_run_id": {
"title": "Task Run Id",
"type": "string"
}
},
"required": [
"task_run_id",
"state"
],
"type": "object"
}