Skip to content

🧹 Refactor poller to reduce duplication in retry and concurrency logic#30

Merged
arvarik merged 1 commit into
mainfrom
refactor-poller-duplication-3632426758128270331
Mar 25, 2026
Merged

🧹 Refactor poller to reduce duplication in retry and concurrency logic#30
arvarik merged 1 commit into
mainfrom
refactor-poller-duplication-3632426758128270331

Conversation

@arvarik

@arvarik arvarik commented Mar 23, 2026

Copy link
Copy Markdown
Owner

🎯 What: Introduced pollWithRetry, pollAsync, and safePoll helper methods in internal/poller/poller.go to encapsulate duplicated polling, retry, and concurrency logic. Refactored all polling tiers to use these helpers.
💡 Why: This significantly improves maintainability and readability by reducing boilerplate code and unifying error handling and panic recovery patterns across different polling tiers.
Verification: Verified through code review and manual inspection of the refactored code. Compilation and full test suite were attempted, though external dependency downloads were limited by the environment.
Result: Multiple 15-line blocks of duplicated code were reduced to concise 2-3 line calls, and panic recovery was centralized into a single helper.


PR created automatically by Jules for task 3632426758128270331 started by @arvarik

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
@arvarik
arvarik merged commit 42bcdb1 into main Mar 25, 2026
1 check passed
@arvarik
arvarik deleted the refactor-poller-duplication-3632426758128270331 branch March 25, 2026 05:24
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.

1 participant