Removed some commented out code and adjusted a few loggers to make more sense contextually. (#13424)

This commit is contained in:
Lila Yasin 2023-01-24 19:16:17 -05:00 committed by Hao Liu
parent 33f070081c
commit e7fa730f81
3 changed files with 3 additions and 6 deletions

View File

@ -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 = """
********** **********

View File

@ -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')

View File

@ -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()