Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,9 @@ async def main():

The library can be configured using environment variables:

| Variable | Description | Default |
|---------------------------|--------------------------------------------------|---------|
| `DB_UTILS_RETRIES_NUMBER` | Number of retry attempts for database operations | 3 |
| Variable | Description | Default |
|-------------------------|--------------------------------------------------|---------|
| `DB_TRY_RETRIES_NUMBER` | Number of retry attempts for database operations | 3 |

Example:
```bash
Expand Down
2 changes: 1 addition & 1 deletion db_try/retry.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def postgres_retry[**P, T](
func: typing.Callable[P, typing.Coroutine[None, None, T]],
) -> typing.Callable[P, typing.Coroutine[None, None, T]]:
@tenacity.retry(
stop=tenacity.stop_after_attempt(settings.DB_UTILS_RETRIES_NUMBER),
stop=tenacity.stop_after_attempt(settings.DB_TRY_RETRIES_NUMBER),
wait=tenacity.wait_exponential_jitter(),
retry=tenacity.retry_if_exception(_retry_handler),
reraise=True,
Expand Down
2 changes: 1 addition & 1 deletion db_try/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
import typing


DB_UTILS_RETRIES_NUMBER: typing.Final = int(os.getenv("DB_UTILS_RETRIES_NUMBER", "3"))
DB_TRY_RETRIES_NUMBER: typing.Final = int(os.getenv("DB_TRY_RETRIES_NUMBER", "3"))
Loading