2021-04-03 14:12:30 +02:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class Admin::SystemCheck
|
|
|
|
ACTIVE_CHECKS = [
|
|
|
|
Admin::SystemCheck::DatabaseSchemaCheck,
|
|
|
|
Admin::SystemCheck::SidekiqProcessCheck,
|
|
|
|
Admin::SystemCheck::RulesCheck,
|
2022-03-25 21:00:59 +01:00
|
|
|
Admin::SystemCheck::ElasticsearchCheck,
|
2021-04-03 14:12:30 +02:00
|
|
|
].freeze
|
|
|
|
|
|
|
|
def self.perform
|
|
|
|
ACTIVE_CHECKS.each_with_object([]) do |klass, arr|
|
|
|
|
check = klass.new
|
|
|
|
|
|
|
|
if check.pass?
|
|
|
|
arr
|
|
|
|
else
|
|
|
|
arr << check.message
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|