FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Create a helper function to poll for agent deployment readiness by ommistry2914 · Pull Request #61 · digitalocean/gradient-python · GitHub

This repository was archived by the owner on Aug 17, 2026. It is now read-only.

Create a helper function to poll for agent deployment readiness - #61

Closed
ommistry2914 wants to merge 1 commit into
digitalocean:mainfrom
ommistry2914:agentDeployment
Closed

Create a helper function to poll for agent deployment readiness#61
ommistry2914 wants to merge 1 commit into
digitalocean:mainfrom
ommistry2914:agentDeployment

Conversation

Copy link
Copy Markdown

Summary

  • Add synchronous and asynchronous helpers to AgentsResource and AsyncAgentsResource :

          - wait_for_deployment(uuid, *, timeout=120.0, interval=2.0, raise_on_failed=True)
          - async def wait_for_deployment(...)
    
  • These poll retrieve() until the agent deployment reaches STATUS_RUNNING, returns the AgentRetrieveResponse on success, and optionally raises on terminal failure states.

Details

  • Polling defaults: timeout = 120s, interval = 2s.

  • Terminal failure states treated as errors: STATUS_FAILED, STATUS_UNDEPLOYMENT_FAILED, STATUS_DELETED.

  • If raise_on_failed=True (default), a RuntimeError is raised when a terminal failure state is observed.

  • If raise_on_failed=False, the final AgentRetrieveResponse is returned so callers can inspect the state themselves.

  • Returns the same AgentRetrieveResponse object produced by retrieve() for consistency.

fixes #40

bbatha commented Oct 20, 2025

Copy link
Copy Markdown
Collaborator

Thank you for your contribution, however this is a dupe of #56

bbatha closed this Oct 20, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create a helper function to poll for agent deployment readiness

2 participants


Back | FazBrowse Home | New Git URL