Skip to content

feat: use jitter package for TaskAsync retry backoff - #6

Merged
ivan-podgurskiy merged 2 commits into
mainfrom
feat/companion-libraries
Jun 4, 2026
Merged

ivan-podgurskiy merged 2 commits into
mainfrom
feat/companion-libraries

Conversation

@ivan-podgurskiy

Copy link
Copy Markdown
Owner

Summary

  • Add jitter as a runtime dependency and wire it into Patterns.TaskAsync.retry/2
  • Support :full, :equal, :decorrelated, and false jitter strategies (with true as an alias for :full)
  • Update the Task.async and Circuit Breaker guides to document the new backoff behavior

Test plan

  • mix format --check-formatted
  • mix compile --warnings-as-errors
  • mix test (45 doctests, 196 tests)
  • mix credo --strict
  • mix dialyzer --format github

Replace the ad-hoc jitter math in retry/2 with the jitter library so
callers can pick full, equal, or decorrelated strategies.
GenServer.stop/1 returned before the Registry entry was removed, which
caused a race in stop_worker removes the worker on faster CI schedulers.
@ivan-podgurskiy
ivan-podgurskiy merged commit 95f8fb5 into main Jun 4, 2026
4 checks passed
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