Skip to content

Add retry for transient SGS request failures#58

Merged
wilsonfreitas merged 1 commit into
mainfrom
issue-29-sgs-timeout-retry
Jun 14, 2026
Merged

Add retry for transient SGS request failures#58
wilsonfreitas merged 1 commit into
mainfrom
issue-29-sgs-timeout-retry

Conversation

@wilsonfreitas

Copy link
Copy Markdown
Owner

Summary

Fixes #29.

Adds retry with exponential backoff around the SGS HTTP request only, so transient transport failures such as read timeouts can recover without retrying status-code handling or response parsing.

The change covers both:

  • sgs.get_json()
  • sgs.async_get_json()

Verification

  • uv run pytest tests/test_sgs_negative.py tests/sgs/test_series.py
  • uv run pytest tests/test_async.py
  • uv run pytest -m "not integration"
  • uv run pytest -m integration
  • uv run ruff check bcb/ tests/
  • uv run ruff format --check bcb/ tests/
  • uv run mypy bcb/
  • uv run --group docs sphinx-build -b html docs docs/_build/html

@wilsonfreitas wilsonfreitas merged commit 1d425c3 into main Jun 14, 2026
9 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.

Timeout em requisições SGS para séries com grandes períodos de dados

1 participant