forked from External/greenlight
Complete refactor of Gemfile and upgraded gems (#2553)
This commit is contained in:
@ -47,9 +47,7 @@ class HealthCheckController < ApplicationController
|
||||
end
|
||||
|
||||
def database_check
|
||||
if defined?(ActiveRecord)
|
||||
raise "Database not responding" unless ActiveRecord::Migrator.current_version
|
||||
end
|
||||
raise "Database not responding" if defined?(ActiveRecord) && !ActiveRecord::Migrator.current_version
|
||||
raise "Pending migrations" unless ActiveRecord::Migration.check_pending!.nil?
|
||||
end
|
||||
|
||||
@ -61,9 +59,7 @@ class HealthCheckController < ApplicationController
|
||||
settings = ActionMailer::Base.smtp_settings
|
||||
|
||||
smtp = Net::SMTP.new(settings[:address], settings[:port])
|
||||
if settings[:enable_starttls_auto] == "true"
|
||||
smtp.enable_starttls_auto if smtp.respond_to?(:enable_starttls_auto)
|
||||
end
|
||||
smtp.enable_starttls_auto if settings[:enable_starttls_auto] == ("true") && smtp.respond_to?(:enable_starttls_auto)
|
||||
|
||||
if settings[:authentication].present? && settings[:authentication] != "none"
|
||||
smtp.start(settings[:domain]) do |s|
|
||||
|
Reference in New Issue
Block a user