def run(self): print 'starting %s ....' % PROGNAME logger.info('starting %s ....' % PROGNAME) config = SkyPunchConfig(logger) targetmodel = TargetModel(logger,config) notifiermodel = NotifierModel(logger,config) puncher = Puncher(logger,targetmodel,notifiermodel) try: while True: ids = targetmodel.get_ids() for id in ids: target = targetmodel.get(id) if target.enabled: puncher.punch(target) time.sleep(config.getint(skypunchconfig.SETTINGS,skypunchconfig.MAINLOOPTOV)) except SystemExit, e: sys.exit(e)
def run(self): print 'starting %s ....' % PROGNAME logger.info('starting %s ....' % PROGNAME) config = SkyPunchConfig(logger) targetmodel = TargetModel(logger, config) notifiermodel = NotifierModel(logger, config) puncher = Puncher(logger, targetmodel, notifiermodel) try: while True: ids = targetmodel.get_ids() for id in ids: target = targetmodel.get(id) if target.enabled: puncher.punch(target) time.sleep( config.getint(skypunchconfig.SETTINGS, skypunchconfig.MAINLOOPTOV)) except SystemExit, e: sys.exit(e)