import logging
import os
import signal
+import sys
import time
from bunch import Bunch
level=logging.getLevelName(args.log_lvl),
datefmt='%m/%d/%Y %H:%M:%S')
+status = 0
+
with open(args.config_file) as f:
cfg = json.load(f)
for bunch_cfg in cfg['bunches']:
bunches.append( Bunch(bunch_cfg) )
-
for bunch in bunches:
bunch.start()
while not stop:
+ for bunch in bunches:
+ if not bunch.is_running():
+ stop = True
+ status = 1
time.sleep(2.0)
for bunch in bunches:
bunch.stop()
+
+sys.exit(status)