We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 6eef996 + 11d641a commit a9e0f6fCopy full SHA for a9e0f6f
1 file changed
config.cable.ru
@@ -3,4 +3,19 @@
3
require_relative 'config/environment'
4
Rails.application.eager_load!
5
6
+map '/health/liveness' do
7
+ run lambda { |_env|
8
+ begin
9
+ ApplicationRecord.connection.execute('SELECT 1')
10
+ [200, { 'content-type' => 'text/plain' }, ['OK']]
11
+ rescue StandardError => e
12
+ if Rails.env.local?
13
+ [500, { 'content-type' => 'text/plain' }, [e.message]]
14
+ else
15
+ [500, { 'content-type' => 'text/plain' }, ['ERROR']]
16
+ end
17
18
+ }
19
+end
20
+
21
run ActionCable.server
0 commit comments