Пример #1
0
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()
Пример #2
0
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()