Add system checks to dashboard in admin UI (#15989)

This commit is contained in:
Eugen Rochko
2021-04-03 14:12:30 +02:00
committed by GitHub
parent 82cce18227
commit 487e37d6d4
10 changed files with 152 additions and 7 deletions

View File

@@ -0,0 +1,21 @@
# frozen_string_literal: true
class Admin::SystemCheck
ACTIVE_CHECKS = [
Admin::SystemCheck::DatabaseSchemaCheck,
Admin::SystemCheck::SidekiqProcessCheck,
Admin::SystemCheck::RulesCheck,
].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