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 5d9ae2ac
authored
Mar 21, 2024
by
‘chizw’
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
[+]数据库连接池优化
1 parent
b64534b5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
kafka_service/funasr_producer.py
kafka_service/funasr_producer.py
View file @
5d9ae2a
...
@@ -21,12 +21,11 @@ def send_message_analysis(message):
...
@@ -21,12 +21,11 @@ def send_message_analysis(message):
producer
.
flush
()
producer
.
flush
()
def
send_wait_task
():
def
send_wait_task
():
res
=
funasr_db
.
select_ali_asr_model_wait
()
wait_
res
=
funasr_db
.
select_ali_asr_model_wait
()
if
res
is
None
or
isinstance
(
res
,
bool
)
or
len
(
res
)
<
1
:
if
wait_res
is
None
or
isinstance
(
wait_res
,
bool
)
or
len
(
wait_
res
)
<
1
:
return
return
json_res
=
json
.
loads
(
res
)
print
(
f
"服务启动推送等待任务:{wait_res}"
)
print
(
f
"服务启动推送等待任务:{json_res}"
)
for
item
in
wait_res
:
for
item
in
json_res
:
task_id
=
item
[
'task_id'
]
task_id
=
item
[
'task_id'
]
data
=
{
"task_id"
:
task_id
}
data
=
{
"task_id"
:
task_id
}
message
=
json
.
dumps
(
data
)
.
encode
(
'utf-8'
)
message
=
json
.
dumps
(
data
)
.
encode
(
'utf-8'
)
...
...
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