fix: standardize startup database retries

This commit is contained in:
Gabriel20xx committed 2026-09-23 04:56:32 +02:00
1 parent c743ee7f5b
commit b85601ae32
5 files changed
+225 -24

No files matched your search

+4 -1
View File
@@ -3,7 +3,7 @@
Shared Python backend infrastructure for services using `asyncpg`:
- validated `DATABASE_URL` and pool settings;
- one async pool owner with ping and graceful shutdown;
- one async pool owner with startup retry, ping, and graceful shutdown;
- bcrypt password and secure session-token helpers;
- short-lived, one-time admin reset codes printed to the server console;
- common account/session persistence for the single-admin or optional multi-user model;
@@ -19,6 +19,9 @@ install during development:
pip install "git+https://repos.gfranz.ch/Gabriel20xx/shared@v0.1.0#subdirectory=packages/python-backend"
```
Database startup uses `DB_INIT_RETRY_INTERVAL_MS` (default `5000`, minimum
`250`) and `DB_INIT_RETRY_MAX_ATTEMPTS` (default `0`, retry indefinitely).
## `authclient`: adopting AuthGuard instead of local auth
`shared_backend.authclient` is how a service trades its own local user table