List tasks for a workflow run. Examples: skyvern tasks list --workflow-run-id wr_abc123 skyvern tasks list --workflow-run-id wr_abc123 --json
(
ctx: typer.Context,
workflow_run_id: str = typer.Option(..., "--workflow-run-id", "-r", help="Workflow run ID"),
json_output: bool = typer.Option(False, "--json", help="Output as JSON."),
)
| 55 | |
| 56 | @tasks_app.command("list") |
| 57 | def list_tasks( |
| 58 | ctx: typer.Context, |
| 59 | workflow_run_id: str = typer.Option(..., "--workflow-run-id", "-r", help="Workflow run ID"), |
| 60 | json_output: bool = typer.Option(False, "--json", help="Output as JSON."), |
| 61 | ) -> None: |
| 62 | """List tasks for a workflow run. |
| 63 | |
| 64 | Examples: |
| 65 | skyvern tasks list --workflow-run-id wr_abc123 |
| 66 | skyvern tasks list --workflow-run-id wr_abc123 --json |
| 67 | """ |
| 68 | client = _get_client(ctx.obj.get("api_key") if ctx.obj else None) |
| 69 | try: |
| 70 | tasks = _list_workflow_tasks(client, workflow_run_id) |
| 71 | except Exception as e: |
| 72 | output_error(f"Failed to list tasks: {e}", action="tasks.list", json_mode=json_output) |
| 73 | |
| 74 | if json_output: |
| 75 | output(tasks, action="tasks.list", json_mode=True) |
| 76 | else: |
| 77 | console.print(Panel(json.dumps(tasks, indent=2), border_style="cyan")) |
nothing calls this directly
no test coverage detected