From e7fa730f81cec163340cfbd86ecba099f257ef35 Mon Sep 17 00:00:00 2001 From: Lila Yasin Date: Tue, 24 Jan 2023 19:16:17 -0500 Subject: [PATCH] Removed some commented out code and adjusted a few loggers to make more sense contextually. (#13424) --- awx/main/management/commands/run_heartbeet.py | 3 --- awx/main/management/commands/run_wsrelay.py | 4 ++-- awx/main/wsrelay.py | 2 +- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/awx/main/management/commands/run_heartbeet.py b/awx/main/management/commands/run_heartbeet.py index 3d6d4aaa82..199412dfab 100644 --- a/awx/main/management/commands/run_heartbeet.py +++ b/awx/main/management/commands/run_heartbeet.py @@ -14,9 +14,6 @@ logger = logging.getLogger('awx.main.commands.run_heartbeet') class Command(BaseCommand): help = 'Launch the web server beacon (heartbeet)' - # def add_arguments(self, parser): - # parser.add_argument('--status', dest='status', action='store_true', help='print the internal state of any running broadcast websocket') - def print_banner(self): heartbeet = """ ********** ********** diff --git a/awx/main/management/commands/run_wsrelay.py b/awx/main/management/commands/run_wsrelay.py index ce778b8356..8bdf6ea0a3 100644 --- a/awx/main/management/commands/run_wsrelay.py +++ b/awx/main/management/commands/run_wsrelay.py @@ -99,7 +99,7 @@ class Command(BaseCommand): executor = MigrationExecutor(connection) migrating = bool(executor.migration_plan(executor.loader.graph.leaf_nodes())) except Exception as exc: - logger.info(f'Error on startup of run_wsrelay (error: {exc}), retry in 10s...') + logger.warning(f'Error on startup of run_wsrelay (error: {exc}), retry in 10s...') time.sleep(10) return @@ -166,4 +166,4 @@ class Command(BaseCommand): websocket_relay_manager = WebSocketRelayManager() asyncio.run(websocket_relay_manager.run()) except KeyboardInterrupt: - logger.debug('Terminating Websocket Relayer') + logger.info('Terminating Websocket Relayer') diff --git a/awx/main/wsrelay.py b/awx/main/wsrelay.py index be0ea04162..77b2c8a393 100644 --- a/awx/main/wsrelay.py +++ b/awx/main/wsrelay.py @@ -94,7 +94,7 @@ class WebsocketRelayConnection: # Early on, this is our canary. I'm not sure what exceptions we can really encounter. logger.warning(f"Connection from {self.name} to {self.remote_host} failed for unknown reason: '{e}'.", exc_info=True) else: - logger.info(f"Connection from {self.name} to {self.remote_host} lost, but no exception was raised.") + logger.debug(f"Connection from {self.name} to {self.remote_host} lost, but no exception was raised.") finally: self.connected = False self.stats.record_connection_lost()