瀏覽代碼

执行异常处理

zhangyong 11 月之前
父節點
當前提交
4aaa142800
共有 3 個文件被更改,包括 0 次插入3 次删除
  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)