Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
manager
Project
Overview
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
reyun
manager
Commits
a190978e
Commit
a190978e
authored
Jan 07, 2022
by
lzxry
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
临时任务
parent
669cce49
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
TrackingFlowTask.java
src/main/java/track/task/TrackingFlowTask.java
+2
-0
applicationContext-schedule.xml
src/main/resources/spring/applicationContext-schedule.xml
+2
-2
No files found.
src/main/java/track/task/TrackingFlowTask.java
View file @
a190978e
...
...
@@ -430,6 +430,8 @@ public class TrackingFlowTask {
if
(
info
.
getPoolSize
()
<=
0
||
info
.
getPoolSize
()
>
100
)
{
info
.
setPoolSize
(
30
);
}
info
.
setStatus
(
"tasking"
);
restTaskInfoRepository
.
save
(
info
);
ExecutorService
executorService
=
Executors
.
newFixedThreadPool
(
info
.
getPoolSize
());
...
...
src/main/resources/spring/applicationContext-schedule.xml
View file @
a190978e
...
...
@@ -70,13 +70,13 @@
</task:scheduled-tasks>
<!--临时跑一段时间内的流量任务-->
<task:scheduled-tasks>
<task:scheduled
ref=
"syncTrackingFlowTask"
method=
"reset"
cron=
"0
15 23 7 6
? "
/>
<task:scheduled
ref=
"syncTrackingFlowTask"
method=
"reset"
cron=
"0
0/7 * * *
? "
/>
</task:scheduled-tasks>
<bean
id=
"syncCalculationFlowTask"
class=
"track.task.TrackingFlowTask"
></bean>
<task:scheduled-tasks>
<!--定时同步流量(每7分钟执行一次)-->
<task:scheduled
ref=
"syncCalculationFlowTask"
method=
"syncFlow"
cron=
"0 0/
5
* * * ? "
/>
<task:scheduled
ref=
"syncCalculationFlowTask"
method=
"syncFlow"
cron=
"0 0/
7
* * * ? "
/>
</task:scheduled-tasks>
<bean
id=
"syncIPSendTime"
class=
"track.task.CASIPSendTimeTask"
></bean>
...
...
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