Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
eshiled-new
/
funasr_web
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit fb258d94
authored
Apr 02, 2025
by
‘chizw’
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
[+]限制优化
1 parent
21203ba4
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
mysql_service/funasr_db.py
mysql_service/funasr_db.py
View file @
fb258d9
...
@@ -37,17 +37,17 @@ def update_ali_asr_model_res(task_id: str, json_output: str, execute_time: int):
...
@@ -37,17 +37,17 @@ def update_ali_asr_model_res(task_id: str, json_output: str, execute_time: int):
def
update_ali_asr_model_res_fail
(
task_id
:
str
,
exception_msg
:
str
,
exception
:
str
):
def
update_ali_asr_model_res_fail
(
task_id
:
str
,
exception_msg
:
str
,
exception
:
str
):
update_sql
=
(
update_sql
=
(
"update ali_asr_model_res t set
t.task_status = case when exception_limit >=
%
s then 2 else 0 end
, "
"update ali_asr_model_res t set
exception_limit = exception_limit + 1
, "
"t.exception_msg =
%
s, t.exception_log =
%
s, "
"t.exception_msg =
%
s, t.exception_log =
%
s, "
"
exception_limit = exception_limit + 1
"
"
t.task_status = case when exception_limit >=
%
s then 2 else 0 end
"
"where t.task_id =
%
s and del_flag = 0;"
)
"where t.task_id =
%
s and del_flag = 0;"
)
return
pool
.
update_one
(
update_sql
,
(
EXCEPTION_LIMIT
,
exception_msg
,
exception
,
task_id
,))
return
pool
.
update_one
(
update_sql
,
(
EXCEPTION_LIMIT
,
exception_msg
,
exception
,
task_id
,))
def
update_ali_asr_model_res_skip
(
task_id
:
str
):
def
update_ali_asr_model_res_skip
(
task_id
:
str
):
update_sql
=
(
update_sql
=
(
"update ali_asr_model_res t set
t.task_status = case when exception_limit >=
%
s then 2 else 0 end
,"
"update ali_asr_model_res t set
exception_limit = exception_limit + 1
,"
"
exception_limit = exception_limit + 1
"
"
t.task_status = case when exception_limit >=
%
s then 2 else 0 end
"
"where t.task_id =
%
s and del_flag = 0;"
)
"where t.task_id =
%
s and del_flag = 0;"
)
return
pool
.
update_one
(
update_sql
,
(
EXCEPTION_LIMIT
,
task_id
,))
return
pool
.
update_one
(
update_sql
,
(
EXCEPTION_LIMIT
,
task_id
,))
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment