RepoListener now connects directly to Postgres on port 5432 for NOTIFY/LISTEN, bypassing pgbouncer (port 6432) which does not support session-level LISTEN in transaction-pooling mode. Additionally, connection and LISTEN are moved from init/1 to handle_continue/2 so the GenServer starts immediately and the pod boots healthy even when the DB is temporarily unreachable. Connection failures are retried with exponential backoff (200ms → 30s max). The notifications process is monitored and reconnected if it dies. Falls back to the configured port if port 5432 is unreachable (e.g. dev/test environments without pgbouncer). Co-Authored-By: Claude <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| microwaveprop | ||
| microwaveprop_web | ||
| mix/tasks | ||
| microwaveprop.ex | ||
| microwaveprop_web.ex | ||