gitlab-org--gitlab-foss/lib/system_check/app/active_users_check.rb
2017-05-31 14:33:03 +02:00

17 lines
369 B
Ruby

module SystemCheck
module App
class ActiveUsersCheck < SystemCheck::BaseCheck
set_name 'Active users:'
def multi_check
active_users = User.active.count
if active_users > 0
$stdout.puts active_users.to_s.color(:green)
else
$stdout.puts active_users.to_s.color(:red)
end
end
end
end
end