def schedule_thread_worker(schedule, logger):
''' schedule thread, takes care of running processes in the future '''
global CTRL_C
logLine = 'starting thread_worker'
logger.debug(logLine)
while not CTRL_C['STOP']:
#print('looping', CTRL_C)
sys.stdout.flush()
schedule.run_pending()
logLine = 'scheduler woke {0}'.format(
threading.current_thread().getName())
time.sleep(1)
logger.debug(logLine)
logger.debug('Threading stop:{0}'.format(
threading.current_thread().getName()))
sys.exit()
评论列表
文章目录