riverqueue / riverui

A web interface for River, fast and reliable background jobs in Go.
https://ui.riverqueue.com/
Mozilla Public License 2.0
43 stars 3 forks source link

Add healthcheck handler #68

Closed isaacd9 closed 4 days ago

isaacd9 commented 6 days ago

Add a Healthcheck handler at /healthcheck.

Closes https://github.com/riverqueue/riverui/issues/67

brandur commented 4 days ago

@isaacd9 Thank you!

Do you mind if I take this one over? I just brought in a small API framework in #63, and we're starting to write more tests for new endpoints. I also want to follow this pattern [1] of two separate health check endpoints, one of which will ping the database to make sure it's also healthy. Basic health check endpoints are useful in some cases like where a proxy might want to it to check liveness, but the app could be totally non-functional because the DB is down and a basic health check would still be reading as healthy.

[1] https://brandur.org/fragments/database-health-check

brandur commented 4 days ago

Pitched up https://github.com/riverqueue/riverui/pull/72 as an alternative.