mirror of
https://github.com/glitch-soc/mastodon.git
synced 2024-11-29 19:40:23 -05:00
22 lines
414 B
Ruby
22 lines
414 B
Ruby
|
# 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
|