Fix awx-manage run_wsrelay --status (#14997)

by don't start the metrics server if --status is passed in
This commit is contained in:
Hao Liu 2024-03-14 14:55:05 -04:00 committed by GitHub
parent d903c524f5
commit 615f09226f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -92,8 +92,6 @@ class Command(BaseCommand):
return host_stats
def handle(self, *arg, **options):
WebsocketsMetricsServer().start()
# it's necessary to delay this import in case
# database migrations are still running
from awx.main.models.ha import Instance
@ -166,6 +164,8 @@ class Command(BaseCommand):
return
WebsocketsMetricsServer().start()
try:
websocket_relay_manager = WebSocketRelayManager()
asyncio.run(websocket_relay_manager.run())