Skip to content

feat: add before_sleep as constructor arg to RetryStrategy.#269

Merged
rwiker merged 1 commit into
mainfrom
feat/reatry-strategy-expose-before_sleep
Jun 19, 2026
Merged

feat: add before_sleep as constructor arg to RetryStrategy.#269
rwiker merged 1 commit into
mainfrom
feat/reatry-strategy-expose-before_sleep

Conversation

@rwiker

@rwiker rwiker commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Issue

N/A

Description

For the uploader, we want to capture the number of retries for uploads. We can do that through the before_sleep argument to tenacity.Retrying / tenacity.AsyncRetrying: we can pass a closure that modifies a dict/list/object`.

How to test

The default value for this argument is the same as what we previously hardcoded, so there should be no difference in behaviour.

Checklist

  • No redundant `print()` statements, commented-out code, or other remnants from the development 👀
  • New/refactored code is following same conventions as the rest of the code base 🧬
  • New/refactored code is tested ⚙
  • Documentation has been updated 🧾
  • Commits are semantic ✅

@rwiker
rwiker requested a review from a team June 19, 2026 09:41
@rwiker
rwiker merged commit 0e10349 into main Jun 19, 2026
11 checks passed
@rwiker
rwiker deleted the feat/reatry-strategy-expose-before_sleep branch June 19, 2026 14:34
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