设置时间限制,等待任务结束
设置时间限制,等待任务结束
import time
print('start task and wait')
waitflag = 0
timeline = 10
while True:
    time.sleep(60)
    print('check process and get result')
    task_reslut = True
    if task_reslut:
        waitflag += 1
    else:
        waitflag = 0
    if waitflag >= timeline:
        print('task end success')
        break
 
                    
                     
                    
                 
                    
                
 
                
            
         
         浙公网安备 33010602011771号
浙公网安备 33010602011771号