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
bea79cde
authored
May 23, 2019
by
xuxueli
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
update document
parent
f1a6f812
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
xxl-job-admin/src/main/java/com/xxl/job/admin/core/thread/JobTriggerPoolHelper.java
xxl-job-admin/src/main/java/com/xxl/job/admin/core/thread/JobTriggerPoolHelper.java
View file @
bea79cde
...
@@ -5,7 +5,6 @@ import com.xxl.job.admin.core.trigger.XxlJobTrigger;
...
@@ -5,7 +5,6 @@ import com.xxl.job.admin.core.trigger.XxlJobTrigger;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
import
java.util.Map
;
import
java.util.concurrent.*
;
import
java.util.concurrent.*
;
import
java.util.concurrent.atomic.AtomicInteger
;
import
java.util.concurrent.atomic.AtomicInteger
;
...
@@ -50,7 +49,7 @@ public class JobTriggerPoolHelper {
...
@@ -50,7 +49,7 @@ public class JobTriggerPoolHelper {
// job timeout count
// job timeout count
private
volatile
long
minTim
=
System
.
currentTimeMillis
()/
60000
;
// ms > min
private
volatile
long
minTim
=
System
.
currentTimeMillis
()/
60000
;
// ms > min
private
volatile
Map
<
Integer
,
AtomicInteger
>
jobTimeoutCountMap
=
new
ConcurrentHashMap
<>();
private
volatile
ConcurrentHash
Map
<
Integer
,
AtomicInteger
>
jobTimeoutCountMap
=
new
ConcurrentHashMap
<>();
/**
/**
...
@@ -89,7 +88,7 @@ public class JobTriggerPoolHelper {
...
@@ -89,7 +88,7 @@ public class JobTriggerPoolHelper {
// incr timeout-count-map
// incr timeout-count-map
long
cost
=
System
.
currentTimeMillis
()-
start
;
long
cost
=
System
.
currentTimeMillis
()-
start
;
if
(
cost
>
500
)
{
// ob-timeout threshold 500ms
if
(
cost
>
500
)
{
// ob-timeout threshold 500ms
AtomicInteger
timeoutCount
=
jobTimeoutCountMap
.
put
(
jobId
,
new
AtomicInteger
(
1
));
AtomicInteger
timeoutCount
=
jobTimeoutCountMap
.
put
IfAbsent
(
jobId
,
new
AtomicInteger
(
1
));
if
(
timeoutCount
!=
null
)
{
if
(
timeoutCount
!=
null
)
{
timeoutCount
.
incrementAndGet
();
timeoutCount
.
incrementAndGet
();
}
}
...
...
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