def _prYMHandler(mypipe): shutdown = False hps = YMHandler() while not shutdown: job = hps.handle() if not job: time.sleep(1) if mypipe.poll(): shutdown = mypipe.recv()
def prYMHandler(): global core2log shutdown = False ymh = YMHandler() while not shutdown: try: job = ymh.handle() if not job: time.sleep(1) except: errorstr = traceback.format_exc() print errorstr core2log.error('<YMHandler>\n{0}'.format(errorstr)) raw_input()