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 8a00fcc7
authored
Mar 23, 2024
by
‘chizw’
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
[+]参数优化
1 parent
d064c410
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletions
funasr_service.py
mysql_service/funasr_db.py
funasr_service.py
View file @
8a00fcc
...
@@ -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
...
...
mysql_service/funasr_db.py
View file @
8a00fcc
...
@@ -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
,))
...
...
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