Skip to content

Commit

Permalink
Fix awx-manage run_wsrelay --status (ansible#14997)
Browse files Browse the repository at this point in the history
by don't start the metrics server if --status is passed in
  • Loading branch information
TheRealHaoLiu authored and djyasin committed Sep 11, 2024
1 parent f6c2c72 commit 170c543
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions awx/main/management/commands/run_wsrelay.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,6 @@ def get_connection_stats(cls, hostnames, data):
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
Expand Down Expand Up @@ -166,6 +164,8 @@ def handle(self, *arg, **options):

return

WebsocketsMetricsServer().start()

try:
websocket_relay_manager = WebSocketRelayManager()
asyncio.run(websocket_relay_manager.run())
Expand Down

0 comments on commit 170c543

Please sign in to comment.