From 4034230aa1ac976ccdd9739efaf1afa53a5656ba Mon Sep 17 00:00:00 2001 From: Ben Thorner Date: Thu, 15 Oct 2020 09:40:53 +0100 Subject: [PATCH] Add healthcheck for memcached Previously this repo had a very basic healthcheck. This extends it with a more thorough check of the infrastructure it needs to run: Memcached [1] [2]. Since the caching can fail silently, there is even more motivation for us to know about it. [1]: https://github.com/alphagov/slimmer/blob/64482b28572a7d038827de214832317e75f0c1ae/lib/slimmer.rb#L13 [2]: https://github.com/alphagov/government-frontend/blob/0bd1bbad134b2ddb521e2372b45df0d08bc7b142/Gemfile#L5 --- config/routes.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/config/routes.rb b/config/routes.rb index d6747e131..d40c4a721 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -8,7 +8,10 @@ mount GovukPublishingComponents::Engine, at: "/component-guide" - get "healthcheck", to: proc { [200, {}, [""]] } + get "/healthcheck", + to: GovukHealthcheck.rack_response( + GovukHealthcheck::RailsCache, + ) get "/government/uploads/*path" => "asset_manager_redirect#show", format: false