mirror of
https://github.com/ansible/awx.git
synced 2026-02-25 23:16:01 -03:30
Removed some commented out code and adjusted a few loggers to make more sense contextually. (#13424)
This commit is contained in:
@@ -14,9 +14,6 @@ logger = logging.getLogger('awx.main.commands.run_heartbeet')
|
|||||||
class Command(BaseCommand):
|
class Command(BaseCommand):
|
||||||
help = 'Launch the web server beacon (heartbeet)'
|
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):
|
def print_banner(self):
|
||||||
heartbeet = """
|
heartbeet = """
|
||||||
********** **********
|
********** **********
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ class Command(BaseCommand):
|
|||||||
executor = MigrationExecutor(connection)
|
executor = MigrationExecutor(connection)
|
||||||
migrating = bool(executor.migration_plan(executor.loader.graph.leaf_nodes()))
|
migrating = bool(executor.migration_plan(executor.loader.graph.leaf_nodes()))
|
||||||
except Exception as exc:
|
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)
|
time.sleep(10)
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -166,4 +166,4 @@ class Command(BaseCommand):
|
|||||||
websocket_relay_manager = WebSocketRelayManager()
|
websocket_relay_manager = WebSocketRelayManager()
|
||||||
asyncio.run(websocket_relay_manager.run())
|
asyncio.run(websocket_relay_manager.run())
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
logger.debug('Terminating Websocket Relayer')
|
logger.info('Terminating Websocket Relayer')
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ class WebsocketRelayConnection:
|
|||||||
# Early on, this is our canary. I'm not sure what exceptions we can really encounter.
|
# 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)
|
logger.warning(f"Connection from {self.name} to {self.remote_host} failed for unknown reason: '{e}'.", exc_info=True)
|
||||||
else:
|
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:
|
finally:
|
||||||
self.connected = False
|
self.connected = False
|
||||||
self.stats.record_connection_lost()
|
self.stats.record_connection_lost()
|
||||||
|
|||||||
Reference in New Issue
Block a user