Class: Ready::For::Migration::HealthController

Inherits:
ActionController::Base
  • Object
show all
Includes:
HealthActionInspectable
Defined in:
app/controllers/ready/for/migration/health_controller.rb

Instance Method Summary collapse

Methods included from HealthActionInspectable

cache, sleep_enabled?

Instance Method Details

#readinessObject



7
8
9
10
11
12
13
# File 'app/controllers/ready/for/migration/health_controller.rb', line 7

def readiness
  if ApplicationRecord.connection.migration_context.needs_migration?
    head 503
  else
    head 200
  end
end