Skip to content

feat: improve task polling #409

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

feat: improve task polling #409

wants to merge 3 commits into from

Conversation

tdstein
Copy link
Collaborator

@tdstein tdstein commented May 6, 2025

Implements an improved task polling mechanism with configurable wait time. This helps to minimize resource consumption on the Connect server while still providing responsive feedback.

Replaces #408

Implements an improved task polling mechanism with configurable wait time. This helps to minimize resource consumption
on the Connect server while still providing responsive feedback.
@tdstein tdstein requested a review from a team May 6, 2025 21:37
Copy link

github-actions bot commented May 6, 2025

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
1891 1782 94% 0% 🟢

New Files

No new covered files...

Modified Files

File Coverage Status
src/posit/connect/tasks.py 100% 🟢
TOTAL 100% 🟢

updated for commit: c3c26b1 by action🐍

backoff : float, default 1.5
Backoff multiplier for increasing wait times.
wait : int, default 1
Wait time in seconds between polling requests.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Wait time in seconds between polling requests.
Maximum amount of time for the task API request to capture status changes.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't love my suggested wording, either.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a notes section going into more detail.

@tdstein
Copy link
Collaborator Author

tdstein commented May 7, 2025

Added a maximum attempts option so folks can break out of the loop if desired.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants