Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
熊鹏飞
/
xxljob220
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
ac86231d
authored
Jul 18, 2019
by
xuxueli
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
任务触发组件优化,常规1s预加载一次,预加载轮空时主动休眠4s,降低加载频率以及对DB压力;
parent
c00a2995
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
xxl-job-admin/src/main/java/com/xxl/job/admin/core/thread/JobScheduleHelper.java
xxl-job-admin/src/main/java/com/xxl/job/admin/core/thread/JobScheduleHelper.java
View file @
ac86231d
...
@@ -194,8 +194,8 @@ public class JobScheduleHelper {
...
@@ -194,8 +194,8 @@ public class JobScheduleHelper {
// Wait seconds, align second
// Wait seconds, align second
if
(
cost
<
1000
)
{
// scan-overtime, not wait
if
(
cost
<
1000
)
{
// scan-overtime, not wait
try
{
try
{
// pre-read success, exist job in
5s
, wait 1s;
// pre-read success, exist job in
pre-read period
, wait 1s;
// pre-read fail, no exist job in
5s, wait 1
s
// pre-read fail, no exist job in
pre-read period, wait 4
s
TimeUnit
.
MILLISECONDS
.
sleep
((
preReadSuc
?
1000
:
4000
)
-
System
.
currentTimeMillis
()%
1000
);
TimeUnit
.
MILLISECONDS
.
sleep
((
preReadSuc
?
1000
:
4000
)
-
System
.
currentTimeMillis
()%
1000
);
}
catch
(
InterruptedException
e
)
{
}
catch
(
InterruptedException
e
)
{
if
(!
scheduleThreadToStop
)
{
if
(!
scheduleThreadToStop
)
{
...
...
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