Remove colorize usage from floaty status

This commit is contained in:
Jake Spain 2022-04-04 11:25:56 -04:00
parent 80f832ac20
commit 6b67c216f5
No known key found for this signature in database
GPG key ID: BC1C4DA0A085E113

View file

@ -197,9 +197,9 @@ class Utils
pending = pool['pending'] pending = pool['pending']
missing = max - ready - pending missing = max - ready - pending
char = 'o' char = 'o'
puts "#{name.ljust(width)} #{(char * ready).green}#{(char * pending).yellow}#{(char * missing).red}" puts "#{name.ljust(width)} #{(char * ready)}#{(char * pending)}#{(char * missing)}"
rescue StandardError => e rescue StandardError => e
FloatyLogger.error "#{name.ljust(width)} #{e.red}" FloatyLogger.error "#{name.ljust(width)} #{e}"
end end
puts message puts message
when 'NonstandardPooler' when 'NonstandardPooler'
@ -214,13 +214,13 @@ class Utils
pending = pool['pending'] || 0 # not available for nspooler pending = pool['pending'] || 0 # not available for nspooler
missing = max - ready - pending missing = max - ready - pending
char = 'o' char = 'o'
puts "#{name.ljust(width)} #{(char * ready).green}#{(char * pending).yellow}#{(char * missing).red}" puts "#{name.ljust(width)} #{(char * ready)}#{(char * pending)}#{(char * missing)}"
rescue StandardError => e rescue StandardError => e
FloatyLogger.error "#{name.ljust(width)} #{e.red}" FloatyLogger.error "#{name.ljust(width)} #{e}"
end end
when 'ABS' when 'ABS'
FloatyLogger.error 'ABS Not OK' unless status_response FloatyLogger.error 'ABS Not OK' unless status_response
puts 'ABS is OK'.green if status_response puts 'ABS is OK' if status_response
else else
raise "Invalid service type #{service.type}" raise "Invalid service type #{service.type}"
end end