Selaa lähdekoodia

执行异常处理

zhangyong 1 vuosi sitten
vanhempi
commit
4aaa142800
3 muutettua tiedostoa jossa 0 lisäystä ja 3 poistoa
  1. 0 1
      agc_assign_main.py
  2. 0 1
      agc_bk_main.py
  3. 0 1
      agc_main.py

+ 0 - 1
agc_assign_main.py

@@ -63,7 +63,6 @@ def video_task():
                 print("处理结果:", result)
             except concurrent.futures.TimeoutError:
                 # 如果任务超时,则取消任务
-                future.cancel()
                 print("任务超时,已取消.")
             except Exception as e:
                 print("处理任务时出现异常:", e)

+ 0 - 1
agc_bk_main.py

@@ -52,7 +52,6 @@ def video_task():
                 print("处理结果:", result)
             except concurrent.futures.TimeoutError:
                 # 如果任务超时,则取消任务
-                future.cancel()
                 print("任务超时,已取消.")
             except Exception as e:
                 print("处理任务时出现异常:", e)

+ 0 - 1
agc_main.py

@@ -50,7 +50,6 @@ def video_task():
                 print("处理结果:", result)
             except concurrent.futures.TimeoutError:
                 # 如果任务超时,则取消任务
-                future.cancel()
                 print("任务超时,已取消.")
             except Exception as e:
                 print("处理任务时出现异常:", e)