mirror of
https://git.bsd.gay/fef/nyastodon.git
synced 2024-12-27 06:03:42 +01:00
23 lines
544 B
Ruby
23 lines
544 B
Ruby
# frozen_string_literal: true
|
|
|
|
class Admin::SystemCheck
|
|
ACTIVE_CHECKS = [
|
|
Admin::SystemCheck::MediaPrivacyCheck,
|
|
Admin::SystemCheck::DatabaseSchemaCheck,
|
|
Admin::SystemCheck::SidekiqProcessCheck,
|
|
Admin::SystemCheck::RulesCheck,
|
|
Admin::SystemCheck::ElasticsearchCheck,
|
|
].freeze
|
|
|
|
def self.perform(current_user)
|
|
ACTIVE_CHECKS.each_with_object([]) do |klass, arr|
|
|
check = klass.new(current_user)
|
|
|
|
if check.skip? || check.pass?
|
|
arr
|
|
else
|
|
arr << check.message
|
|
end
|
|
end
|
|
end
|
|
end
|