From 343e00b6f785bfdf489c0cd8353b8455970adc00 Mon Sep 17 00:00:00 2001 From: Justin Coyne Date: Tue, 13 Jun 2023 10:04:20 -0500 Subject: [PATCH] Remove okcomputer check for symphony when not using symphony This prevents Honeybadger errors: https://app.honeybadger.io/projects/62116/faults/68862673 --- config/initializers/okcomputer.rb | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/config/initializers/okcomputer.rb b/config/initializers/okcomputer.rb index b2ed9a3f..8fa0aebc 100644 --- a/config/initializers/okcomputer.rb +++ b/config/initializers/okcomputer.rb @@ -2,23 +2,25 @@ OkComputer.mount_at = false -# OKComputer check that checks if we have a connection to symws -class SymphonyClientCheck < OkComputer::Check - def check - ping = SymphonyClient.new.ping +if Settings.ils.client == 'SymphonyClient' + # OKComputer check that checks if we have a connection to symws + class SymphonyClientCheck < OkComputer::Check + def check + ping = SymphonyClient.new.ping - mark_failure unless ping + mark_failure unless ping + end end -end -# OKComputer check that checks if we have a connection to the symphony oracle db -class SymphonyDbClientCheck < OkComputer::Check - def check - ping = SymphonyDbClient.new.ping + # OKComputer check that checks if we have a connection to the symphony oracle db + class SymphonyDbClientCheck < OkComputer::Check + def check + ping = SymphonyDbClient.new.ping - mark_failure unless ping + mark_failure unless ping + end end -end -OkComputer::Registry.register 'symphony_web_services', SymphonyClientCheck.new -OkComputer::Registry.register 'symphony_db_client', SymphonyDbClientCheck.new + OkComputer::Registry.register 'symphony_web_services', SymphonyClientCheck.new + OkComputer::Registry.register 'symphony_db_client', SymphonyDbClientCheck.new +end