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 991c0fef
authored
Dec 26, 2024
by
‘chizw’
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
[+]进程优化
1 parent
d092d6e8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
kafka_service/funasr_consumer.py
mysql_service/funasr_db.py
kafka_service/funasr_consumer.py
View file @
991c0fe
...
@@ -83,7 +83,7 @@ def consume_kafka():
...
@@ -83,7 +83,7 @@ def consume_kafka():
try
:
try
:
# 先创建进程池,只复制当前资源
# 先创建进程池,只复制当前资源
# multiprocessing.set_start_method('spawn')
# multiprocessing.set_start_method('spawn')
process_pool
=
multiprocessing
.
Pool
(
processes
=
1
,
initializer
=
consumer_process_init
)
process_pool
=
multiprocessing
.
Pool
(
processes
=
2
,
initializer
=
consumer_process_init
)
# m = multiprocessing.Manager()
# m = multiprocessing.Manager()
# q = m.JoinableQueue()
# q = m.JoinableQueue()
# # 加载大内存变量
# # 加载大内存变量
...
...
mysql_service/funasr_db.py
View file @
991c0fe
...
@@ -212,6 +212,6 @@ left join ( select
...
@@ -212,6 +212,6 @@ left join ( select
and dclgo.status in (4, 6) and upgrade_flag = 'Y'
and dclgo.status in (4, 6) and upgrade_flag = 'Y'
group by dclgoc.customer_phone
group by dclgoc.customer_phone
order by order_time desc) t4 on rci.phone_number =t4.customer_phone
order by order_time desc) t4 on rci.phone_number =t4.customer_phone
where recording_start_time BETWEEN
%
s AND
%
s;"""
where recording_start_time BETWEEN
%
s AND
%
s
and
;"""
)
)
return
pool
.
select_all
(
sql
,
(
'2024-12-16'
,
'2024-12-23'
))
return
pool
.
select_all
(
sql
,
(
'2024-12-16'
,
'2024-12-23'
))
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