Modules
Phoenix app health for Upstate.
The database section: whether every configured repo answers, and whether any of them
has migrations on disk that are not in its schema_migrations table.
Builds the schema 1 response. Every section catches its own errors and reports nil,
so one failing check never hides the others. A database that does not answer reports
database.ok: false and the status is 503.
The jobs section, read from Oban's oban_jobs table with one aggregate query through
the repo and prefix of the running Oban instance. Job-only nodes therefore do not need
to be scraped: any web container reports the shared queue.
Answers GET /upstate/health with Upstate's app-health schema 1. Every other request
passes through untouched, so it can sit in the endpoint before the router