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
4f09f734
authored
May 23, 2019
by
许雪里
Committed by
GitHub
May 23, 2019
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge pull request #852 from KBCode/patch-1
Update JobTriggerPoolHelper.java
parents
a0b4275c
6b8ded13
Show 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/JobTriggerPoolHelper.java
xxl-job-admin/src/main/java/com/xxl/job/admin/core/thread/JobTriggerPoolHelper.java
View file @
4f09f734
...
@@ -50,7 +50,7 @@ public class JobTriggerPoolHelper {
...
@@ -50,7 +50,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 +89,7 @@ public class JobTriggerPoolHelper {
...
@@ -89,7 +89,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