Gracefully terminate server when SIGINT is caught
Change-Id: I54d69de70f6f200faca1e48d7e040747907327b0
This commit is contained in:
@@ -209,8 +209,11 @@ def main():
|
||||
|
||||
result = execute(quorum, scenario['execution'], agents)
|
||||
LOG.debug('Result: %s', result)
|
||||
except Exception as e:
|
||||
LOG.error('Error while executing scenario: %s', e)
|
||||
except BaseException as e:
|
||||
if isinstance(e, KeyboardInterrupt):
|
||||
LOG.info('Caught SIGINT. Terminating')
|
||||
else:
|
||||
LOG.error('Error while executing scenario: %s', e)
|
||||
finally:
|
||||
if deployment:
|
||||
deployment.cleanup()
|
||||
|
||||
Reference in New Issue
Block a user