]> cat aescling's git repositories - mastodon.git/commitdiff
Change health check (#15988)
authorEugen Rochko <eugen@zeonfederated.com>
Sat, 3 Apr 2021 00:39:04 +0000 (02:39 +0200)
committerGitHub <noreply@github.com>
Sat, 3 Apr 2021 00:39:04 +0000 (02:39 +0200)
Gemfile
Gemfile.lock
app/controllers/health_controller.rb [new file with mode: 0644]
config/initializers/health_check.rb [deleted file]
config/routes.rb

diff --git a/Gemfile b/Gemfile
index 880bb8b517e22d4adc0d5c0d74f82708d1fb7d7a..a813e82f29cbd9e9d9ee1c349edfeba6b4dba85f 100644 (file)
--- a/Gemfile
+++ b/Gemfile
@@ -54,7 +54,6 @@ gem 'fast_blank', '~> 1.0'
 gem 'fastimage'
 gem 'hiredis', '~> 0.6'
 gem 'redis-namespace', '~> 1.8'
-gem 'health_check', git: 'https://github.com/ianheggie/health_check', ref: '0b799ead604f900ed50685e9b2d469cd2befba5b'
 gem 'htmlentities', '~> 4.3'
 gem 'http', '~> 4.4'
 gem 'http_accept_language', '~> 2.1'
index aa2fdd52880c725090045efee520ba257a683151..1768dd2533aae1ce99c5d2971e8524104491b00a 100644 (file)
@@ -21,14 +21,6 @@ GIT
       sidekiq (>= 3.5)
       statsd-ruby (~> 1.4, >= 1.4.0)
 
-GIT
-  remote: https://github.com/ianheggie/health_check
-  revision: 0b799ead604f900ed50685e9b2d469cd2befba5b
-  ref: 0b799ead604f900ed50685e9b2d469cd2befba5b
-  specs:
-    health_check (4.0.0.pre)
-      rails (>= 4.0)
-
 GIT
   remote: https://github.com/nsommer/pluck_each
   revision: 73be0947c52fc54bf6d7085378db008358aac5eb
@@ -755,7 +747,6 @@ DEPENDENCIES
   fog-openstack (~> 0.3)
   fuubar (~> 2.5)
   hamlit-rails (~> 0.2)
-  health_check!
   hiredis (~> 0.6)
   htmlentities (~> 4.3)
   http (~> 4.4)
diff --git a/app/controllers/health_controller.rb b/app/controllers/health_controller.rb
new file mode 100644 (file)
index 0000000..2a22a05
--- /dev/null
@@ -0,0 +1,7 @@
+# frozen_string_literal: true
+
+class HealthController < ActionController::Base
+  def show
+    render plain: 'OK'
+  end
+end
diff --git a/config/initializers/health_check.rb b/config/initializers/health_check.rb
deleted file mode 100644 (file)
index 6f1e78f..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-HealthCheck.setup do |config|
-  config.uri = 'health'
-
-  config.standard_checks = %w(database migrations cache)
-  config.full_checks = %w(database migrations cache)
-  
-  config.include_error_in_response_body = false
-end
index 780a52b0ced7c9b2e1bffa5badbaddf3ae2a89ae..fa1138868ec4cca6fa50f1feff0d62f1490140ad 100644 (file)
@@ -10,7 +10,7 @@ Rails.application.routes.draw do
 
   mount LetterOpenerWeb::Engine, at: 'letter_opener' if Rails.env.development?
 
-  health_check_routes
+  get 'health', to: 'health#show'
 
   authenticate :user, lambda { |u| u.admin? } do
     mount Sidekiq::Web, at: 'sidekiq', as: :sidekiq