Commit 8a00fcc7 by ‘chizw’

[+]参数优化

1 parent d064c410
...@@ -93,6 +93,9 @@ def deal_worker(task_id: str): ...@@ -93,6 +93,9 @@ def deal_worker(task_id: str):
output_data = sql_res[0]["output_data"] output_data = sql_res[0]["output_data"]
if output_data is not None: if output_data is not None:
return return
exception_msg = sql_res[0]["exception_msg"]
if exception_msg is not None and exception_msg == "list index out of range":
return
url = sql_res[0]["file_url"] url = sql_res[0]["file_url"]
if url == "" or len(url) < 1 or not url.startswith("http"): if url == "" or len(url) < 1 or not url.startswith("http"):
return return
......
...@@ -43,7 +43,9 @@ def update_ali_asr_model_res_fail(task_id: str, exception_msg: str, exception: s ...@@ -43,7 +43,9 @@ def update_ali_asr_model_res_fail(task_id: str, exception_msg: str, exception: s
def select_ali_asr_model_res(task_id: str): def select_ali_asr_model_res(task_id: str):
select_sql = ( select_sql = (
f"select id,task_id,file_url,task_status,output_data from ali_asr_model_res aamr where del_flag = 0 and " f"select id,task_id,file_url,task_status,output_data,exception_msg"
f" from ali_asr_model_res aamr"
f" where del_flag = 0 and "
f"task_id = %s and exception_limit < 3;") f"task_id = %s and exception_limit < 3;")
return pool.select_all(select_sql, (task_id,)) return pool.select_all(select_sql, (task_id,))
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!