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
1e1d9e85
authored
Sep 22, 2018
by
xuxueli
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
调度触发线程池配置优化
parent
88b0812b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
8 deletions
xxl-job-admin/src/main/java/com/xxl/job/admin/core/thread/JobTriggerPoolHelper.java
xxl-job-core/src/main/java/com/xxl/job/core/thread/TriggerCallbackThread.java
xxl-job-admin/src/main/java/com/xxl/job/admin/core/thread/JobTriggerPoolHelper.java
View file @
1e1d9e85
...
...
@@ -21,15 +21,15 @@ public class JobTriggerPoolHelper {
// ---------------------- trigger pool ----------------------
private
ThreadPoolExecutor
triggerPool
=
new
ThreadPoolExecutor
(
2
0
,
5
0
,
200
,
6
0L
,
3
0L
,
TimeUnit
.
SECONDS
,
new
LinkedBlockingQueue
<
Runnable
>(
1000
00
),
new
LinkedBlockingQueue
<
Runnable
>(
1000
),
new
ThreadPoolExecutor
.
CallerRunsPolicy
());
public
void
addTrigger
(
final
int
jobId
,
final
int
failRetryCount
,
final
TriggerTypeEnum
triggerType
){
public
void
addTrigger
(
final
int
jobId
,
final
int
failRetryCount
,
final
TriggerTypeEnum
triggerType
)
{
triggerPool
.
execute
(
new
Runnable
()
{
@Override
public
void
run
()
{
...
...
@@ -38,7 +38,7 @@ public class JobTriggerPoolHelper {
});
}
public
void
stop
(){
public
void
stop
()
{
//triggerPool.shutdown();
triggerPool
.
shutdownNow
();
logger
.
info
(
">>>>>>>>> xxl-job trigger thread pool shutdown success."
);
...
...
@@ -49,7 +49,6 @@ public class JobTriggerPoolHelper {
private
static
JobTriggerPoolHelper
helper
=
new
JobTriggerPoolHelper
();
/**
*
* @param jobId
* @param failRetryCount
* >=0: use this param
...
...
@@ -60,7 +59,7 @@ public class JobTriggerPoolHelper {
helper
.
addTrigger
(
jobId
,
failRetryCount
,
triggerType
);
}
public
static
void
toStop
(){
public
static
void
toStop
()
{
helper
.
stop
();
}
...
...
xxl-job-core/src/main/java/com/xxl/job/core/thread/TriggerCallbackThread.java
View file @
1e1d9e85
...
...
@@ -178,7 +178,7 @@ public class TriggerCallbackThread {
}
// ---------------------- f
ial-callback file TODO
----------------------
// ---------------------- f
ail-callback file
----------------------
private
static
String
failCallbackFileName
=
XxlJobFileAppender
.
getLogPath
().
concat
(
File
.
separator
).
concat
(
"xxl-job-callback"
).
concat
(
".log"
);
...
...
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