Skip to content

Commit bec48ed

Browse files
authored
Merge pull request #6 from community-of-python/fix-settings-prefix
fix settings prefix
2 parents c3e5e4a + b276e42 commit bec48ed

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,9 +165,9 @@ async def main():
165165

166166
The library can be configured using environment variables:
167167

168-
| Variable | Description | Default |
169-
|---------------------------|--------------------------------------------------|---------|
170-
| `DB_UTILS_RETRIES_NUMBER` | Number of retry attempts for database operations | 3 |
168+
| Variable | Description | Default |
169+
|-------------------------|--------------------------------------------------|---------|
170+
| `DB_TRY_RETRIES_NUMBER` | Number of retry attempts for database operations | 3 |
171171

172172
Example:
173173
```bash

db_try/retry.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def postgres_retry[**P, T](
2929
func: typing.Callable[P, typing.Coroutine[None, None, T]],
3030
) -> typing.Callable[P, typing.Coroutine[None, None, T]]:
3131
@tenacity.retry(
32-
stop=tenacity.stop_after_attempt(settings.DB_UTILS_RETRIES_NUMBER),
32+
stop=tenacity.stop_after_attempt(settings.DB_TRY_RETRIES_NUMBER),
3333
wait=tenacity.wait_exponential_jitter(),
3434
retry=tenacity.retry_if_exception(_retry_handler),
3535
reraise=True,

db_try/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
import typing
33

44

5-
DB_UTILS_RETRIES_NUMBER: typing.Final = int(os.getenv("DB_UTILS_RETRIES_NUMBER", "3"))
5+
DB_TRY_RETRIES_NUMBER: typing.Final = int(os.getenv("DB_TRY_RETRIES_NUMBER", "3"))

0 commit comments

Comments
 (0)