Skip to content

Commit

Permalink
Add healthcheck for memcached
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Ben Thorner committed Oct 15, 2020
1 parent 0bd1bba commit 4034230
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 4034230

Please sign in to comment.