Commit 69bd6500 authored by Alain Takoudjou's avatar Alain Takoudjou

monitor.runpromise: exit with non zero code if a promise has failed

parent 35979a05
...@@ -156,15 +156,15 @@ class MonitorPromiseLauncher(object): ...@@ -156,15 +156,15 @@ class MonitorPromiseLauncher(object):
) )
self.logger.info("Checking promises...") self.logger.info("Checking promises...")
exit_code = 0
try: try:
promise_launcher.run() promise_launcher.run()
except PromiseError, e: except PromiseError, e:
#self.logger.exception(e)
# error was already logged # error was already logged
pass exit_code = 1
os.remove(self.config.pid_path) os.remove(self.config.pid_path)
self.logger.info("Finished promises.") self.logger.info("Finished promises.")
return exit_code
def main(): def main():
arg_parser = getArgumentParser() arg_parser = getArgumentParser()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment