Skip to content

Commit

Permalink
Fix wsrelay KeyboardInteruption not respected (#15036)
Browse files Browse the repository at this point in the history
- stop wsrelay on keyboard interuption
- restart wsrelay for any other failure reason
  • Loading branch information
TheRealHaoLiu authored Mar 26, 2024
1 parent 3f566c8 commit 8cafdf0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion awx/main/management/commands/run_wsrelay.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,5 +171,8 @@ def handle(self, *arg, **options):
try:
asyncio.run(websocket_relay_manager.run())
except KeyboardInterrupt:
logger.info('Restarting Websocket Relayer')
logger.info('Shutting down Websocket Relayer')
break
except Exception as e:
logger.exception('Error in Websocket Relayer, exception: {}. Restarting in 10 seconds'.format(e))
time.sleep(10)

0 comments on commit 8cafdf0

Please sign in to comment.