Skip to content

Clean up retry backoff per PR #222 review#223

Open
matias-christensen-skydio wants to merge 1 commit intomainfrom
retry-backoff-cleanup
Open

Clean up retry backoff per PR #222 review#223
matias-christensen-skydio wants to merge 1 commit intomainfrom
retry-backoff-cleanup

Conversation

@matias-christensen-skydio
Copy link
Contributor

Summary

Follow-up to #222 addressing review comments from @jerry-skydio:

  • Rename _retry_with_backoff to _should_retry to reflect that it returns a bool, not that it performs the retry
  • Extract transient_statuses and retryable_graphql_errors to module-level frozenset constants (TRANSIENT_STATUSES, RETRYABLE_GRAPHQL_ERRORS); make max_retries and base_delay keyword args on graphql()
  • Split graphql into _graphql_once (single-attempt request logic) and graphql (retry wrapper that catches exceptions), reducing indentation and separating concerns

Address jerry-skydio's review comments:
- Rename _retry_with_backoff to _should_retry to reflect the return value
- Extract transient_statuses and retryable_graphql_errors to module-level
  frozenset constants, make max_retries and base_delay kwargs on graphql()
- Split graphql into _graphql_once (single attempt) and graphql (retry
  wrapper) to reduce indentation and separate concerns
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

Comments