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

Merged
merged 3 commits into from
Jul 22, 2025
Merged

feat: improve task polling #409

merged 3 commits into from
Jul 22, 2025

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.

Resolves #184

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.

@tdstein tdstein merged commit 01524f3 into main Jul 22, 2025
42 checks passed
@tdstein tdstein deleted the tdstein-task-polling branch July 22, 2025 16:57
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.

Improve task polling
2 participants