def prLowPrioritySync(mypipe): shutdown = False lps = LowPrioritySync() while not shutdown: job = lps.doWork() if not job: time.sleep(1) if mypipe.poll(): shutdown = mypipe.recv()
def prLowPrioritySync(): global core2log shutdown = False lps = LowPrioritySync() while not shutdown: try: job = lps.process() if not job: time.sleep(1) except: errorstr = traceback.format_exc() print 'Error on Notify_In id={0}'.format(lps.last_nin_id) core2log.error('Error on Notify_In id={0}'.format(lps.last_nin_id)) core2log.error('<Sync>\n{0}'.format(errorstr)) lps.skipError()