task_wait
Blocks execution until a data transfer task finishes, returning success or failure status. Use to ensure data availability before subsequent operations.
Instructions
Wait for a task to complete.
Blocks until the task finishes (succeeds or fails) or timeout is reached. Use this when you need data in place before proceeding with subsequent operations (e.g., submitting a job that uses the transferred data).
Args: task_id: The UUID of the task to wait for. timeout: Maximum seconds to wait. If None, waits indefinitely. polling_interval: Seconds between status checks (default 1).
Returns: Dict with final task status. Check 'status' field: - 'SUCCEEDED': Transfer completed successfully - 'FAILED': Transfer failed (check 'nice_status' for reason)
Raises: GlobusError: If timeout is reached before task completes.
Examples: # Wait indefinitely result = task_wait("abc123-...") if result['status'] == 'SUCCEEDED': print("Transfer complete!")
# Wait with timeout
result = task_wait("abc123-...", timeout=3600) # 1 hour maxInput Schema
| Name | Required | Description | Default |
|---|---|---|---|
| task_id | Yes | ||
| timeout | No | ||
| polling_interval | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||