mirror of
https://github.com/ansible/awx.git
synced 2026-05-10 10:57:35 -02:30
Fix wsrelay KeyboardInteruption not respected (#15036)
- stop wsrelay on keyboard interuption - restart wsrelay for any other failure reason
This commit is contained in:
@@ -171,5 +171,8 @@ class Command(BaseCommand):
|
|||||||
try:
|
try:
|
||||||
asyncio.run(websocket_relay_manager.run())
|
asyncio.run(websocket_relay_manager.run())
|
||||||
except KeyboardInterrupt:
|
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)
|
time.sleep(10)
|
||||||
|
|||||||
Reference in New Issue
Block a user