-
-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a health check #146
Add a health check #146
Conversation
Set the current Gemstash environment in the Gemstash::Env::RackMiddleware, otherwise health checks could fail
Preserve newline fix from commit bc811ec in the pandoc generation
@smellsblue Is there anything else you want us to have for this to be a healthcheck endpoint? |
@olleolleolle I was hoping to get a review, but then got caught up in other work. If you are happy with what I've done, I can merge it now. I looked at the build failures, and I don't think they are related to my changes. |
@smellsblue I am quite happy with these changes! The build failures do look unrelated. LGTM! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hooray!
@smellsblue We've tried this on production and got this error randomly: Guessed some additional check needs to be performed before inserting. |
This fixes #145
The health endpoint is at
/health
and will check that reading and writing from storage is working.If you want a health endpoint that doesn't do any work, you can use
/health/heartbeat
.The HTTP status code will indicate success vs failure (200 vs 500), and you will receive a JSON response that will indicate the breakdown of what succeeded vs failed.