Skip to main content

Module pool

Module pool 

Source

Structs§

PgMigrator
The migration capability for a Postgres backend, over its connection pool.
PoolConfig
Connection pool configuration. Sensible defaults match the prior hardcoded behavior (max_connections=8, sqlx defaults elsewhere); each field can be overridden by an environment variable so the Helm chart can tune pool sizing without code changes.

Functions§

connect
One-shot connect. Suitable for short-lived CLI commands where a fast failure beats a long retry loop. Reads pool sizing from env.
connect_with_config
connect_with_retry
Retrying connect for boot-time use. Retries with capped exponential backoff (1s → 2s → 4s → … → 10s) until total_deadline elapses, then returns the last error. Use this from the serve and migrate up paths where Postgres may not be ready when sbol-db starts (the bitnami subchart’s postgres pod boots in parallel with the chart’s migration Job).
migration_status
run_migrations

Type Aliases§

PgPool
An alias for Pool, specialized for Postgres.