Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
项目统一框架
amos-boot-biz
Commits
50337b57
Commit
50337b57
authored
Dec 06, 2023
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1异步数据入库修线程数量修改为按照核心来
parent
1c0dced0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
CheckRecordInsertListener.java
...s/patrol/business/listener/CheckRecordInsertListener.java
+3
-1
No files found.
amos-boot-system-tzs/amos-boot-module-tzspatrol/amos-boot-module-tzspatrol-biz/src/main/java/com/yeejoin/amos/patrol/business/listener/CheckRecordInsertListener.java
View file @
50337b57
...
...
@@ -30,6 +30,8 @@ public class CheckRecordInsertListener implements ApplicationContextAware, Appli
@Autowired
Executor
asyncServiceExecutor
;
private
int
curSystemThreads
=
Runtime
.
getRuntime
().
availableProcessors
();
@Override
public
void
onApplicationEvent
(
CheckRecordInsertEvent
event
)
{
...
...
@@ -39,7 +41,7 @@ public class CheckRecordInsertListener implements ApplicationContextAware, Appli
@PostConstruct
public
void
init
()
{
CheckRecordDataConsumer
consumer
=
new
CheckRecordDataConsumer
(
blockingQueue
,
applicationContext
);
for
(
int
i
=
0
;
i
<
10
;
i
++)
{
for
(
int
i
=
0
;
i
<
curSystemThreads
;
i
++)
{
asyncServiceExecutor
.
execute
(
consumer
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment