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
35bceaac
authored
Sep 27, 2019
by
DanielWei
Committed by
GitHub
Sep 27, 2019
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge branch 'master' into fix_graceful_shutdown_callback_lose
parents
4e8e049a
d127f262
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
50 additions
and
6 deletions
README.md
doc/XXL-JOB官方文档.md
xxl-job-admin/src/main/java/com/xxl/job/admin/service/impl/AdminBizImpl.java
xxl-job-core/src/main/java/com/xxl/job/core/biz/impl/ExecutorBizImpl.java
xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java
README.md
View file @
35bceaac
...
@@ -345,6 +345,20 @@ XXL-JOB是一个轻量级分布式任务调度平台,其核心设计目标是
...
@@ -345,6 +345,20 @@ XXL-JOB是一个轻量级分布式任务调度平台,其核心设计目标是
-
226、杭州找趣
-
226、杭州找趣
-
227、浩鲸云计算科技股份有限公司
-
227、浩鲸云计算科技股份有限公司
-
228、科大讯飞【科大讯飞】
-
228、科大讯飞【科大讯飞】
-
229、杭州行装网络科技有限公司
-
230、即有分期金融
-
231、深圳法司德信息科技有限公司
-
232、上海博复信息科技有限公司
-
233、杭州云嘉云计算有限公司
-
234、有家民宿(有家美宿)
-
235、北京赢销通软件技术有限公司
-
236、浙江聚有财金融服务外包有限公司
-
237、易族智汇(北京)科技有限公司
-
238、合肥顶岭医疗科技开发有限公司
-
239、车船宝(深圳)旭珩科技有限公司)
-
240、广州富力地产有限公司
-
241、氢课(上海)教育科技有限公司
-
242、武汉氪细胞网络技术有限公司
-
……
-
……
> 更多接入的公司,欢迎在 [登记地址](https://github.com/xuxueli/xxl-job/issues/1 ) 登记,登记仅仅为了产品推广。
> 更多接入的公司,欢迎在 [登记地址](https://github.com/xuxueli/xxl-job/issues/1 ) 登记,登记仅仅为了产品推广。
...
...
doc/XXL-JOB官方文档.md
View file @
35bceaac
## 《分
布式任务调度平台XXL-JOB》
## 《分
布式任务调度平台XXL-JOB》
...
@@ -313,6 +313,20 @@ XXL-JOB是一个轻量级分布式任务调度平台,其核心设计目标是
...
@@ -313,6 +313,20 @@ XXL-JOB是一个轻量级分布式任务调度平台,其核心设计目标是
-
226、杭州找趣
-
226、杭州找趣
-
227、浩鲸云计算科技股份有限公司
-
227、浩鲸云计算科技股份有限公司
-
228、科大讯飞【科大讯飞】
-
228、科大讯飞【科大讯飞】
-
229、杭州行装网络科技有限公司
-
230、即有分期金融
-
231、深圳法司德信息科技有限公司
-
232、上海博复信息科技有限公司
-
233、杭州云嘉云计算有限公司
-
234、有家民宿(有家美宿)
-
235、北京赢销通软件技术有限公司
-
236、浙江聚有财金融服务外包有限公司
-
237、易族智汇(北京)科技有限公司
-
238、合肥顶岭医疗科技开发有限公司
-
239、车船宝(深圳)旭珩科技有限公司)
-
240、广州富力地产有限公司
-
241、氢课(上海)教育科技有限公司
-
242、武汉氪细胞网络技术有限公司
-
……
-
……
> 更多接入的公司,欢迎在 [登记地址](https://github.com/xuxueli/xxl-job/issues/1 ) 登记,登记仅仅为了产品推广。
> 更多接入的公司,欢迎在 [登记地址](https://github.com/xuxueli/xxl-job/issues/1 ) 登记,登记仅仅为了产品推广。
...
...
xxl-job-admin/src/main/java/com/xxl/job/admin/service/impl/AdminBizImpl.java
View file @
35bceaac
...
@@ -5,6 +5,7 @@ import com.xxl.job.admin.core.model.XxlJobLog;
...
@@ -5,6 +5,7 @@ import com.xxl.job.admin.core.model.XxlJobLog;
import
com.xxl.job.admin.core.thread.JobTriggerPoolHelper
;
import
com.xxl.job.admin.core.thread.JobTriggerPoolHelper
;
import
com.xxl.job.admin.core.trigger.TriggerTypeEnum
;
import
com.xxl.job.admin.core.trigger.TriggerTypeEnum
;
import
com.xxl.job.admin.core.util.I18nUtil
;
import
com.xxl.job.admin.core.util.I18nUtil
;
import
com.xxl.job.admin.dao.XxlJobGroupDao
;
import
com.xxl.job.admin.dao.XxlJobInfoDao
;
import
com.xxl.job.admin.dao.XxlJobInfoDao
;
import
com.xxl.job.admin.dao.XxlJobLogDao
;
import
com.xxl.job.admin.dao.XxlJobLogDao
;
import
com.xxl.job.admin.dao.XxlJobRegistryDao
;
import
com.xxl.job.admin.dao.XxlJobRegistryDao
;
...
@@ -35,6 +36,8 @@ public class AdminBizImpl implements AdminBiz {
...
@@ -35,6 +36,8 @@ public class AdminBizImpl implements AdminBiz {
private
XxlJobInfoDao
xxlJobInfoDao
;
private
XxlJobInfoDao
xxlJobInfoDao
;
@Resource
@Resource
private
XxlJobRegistryDao
xxlJobRegistryDao
;
private
XxlJobRegistryDao
xxlJobRegistryDao
;
@Resource
private
XxlJobGroupDao
xxlJobGroupDao
;
@Override
@Override
...
@@ -126,14 +129,26 @@ public class AdminBizImpl implements AdminBiz {
...
@@ -126,14 +129,26 @@ public class AdminBizImpl implements AdminBiz {
int
ret
=
xxlJobRegistryDao
.
registryUpdate
(
registryParam
.
getRegistGroup
(),
registryParam
.
getRegistryKey
(),
registryParam
.
getRegistryValue
());
int
ret
=
xxlJobRegistryDao
.
registryUpdate
(
registryParam
.
getRegistGroup
(),
registryParam
.
getRegistryKey
(),
registryParam
.
getRegistryValue
());
if
(
ret
<
1
)
{
if
(
ret
<
1
)
{
xxlJobRegistryDao
.
registrySave
(
registryParam
.
getRegistGroup
(),
registryParam
.
getRegistryKey
(),
registryParam
.
getRegistryValue
());
xxlJobRegistryDao
.
registrySave
(
registryParam
.
getRegistGroup
(),
registryParam
.
getRegistryKey
(),
registryParam
.
getRegistryValue
());
// fresh
freshGroupRegistryInfo
(
registryParam
);
}
}
return
ReturnT
.
SUCCESS
;
return
ReturnT
.
SUCCESS
;
}
}
@Override
@Override
public
ReturnT
<
String
>
registryRemove
(
RegistryParam
registryParam
)
{
public
ReturnT
<
String
>
registryRemove
(
RegistryParam
registryParam
)
{
xxlJobRegistryDao
.
registryDelete
(
registryParam
.
getRegistGroup
(),
registryParam
.
getRegistryKey
(),
registryParam
.
getRegistryValue
());
int
ret
=
xxlJobRegistryDao
.
registryDelete
(
registryParam
.
getRegistGroup
(),
registryParam
.
getRegistryKey
(),
registryParam
.
getRegistryValue
());
if
(
ret
>
0
)
{
// fresh
freshGroupRegistryInfo
(
registryParam
);
}
return
ReturnT
.
SUCCESS
;
return
ReturnT
.
SUCCESS
;
}
}
private
void
freshGroupRegistryInfo
(
RegistryParam
registryParam
){
// Under consideration, prevent affecting core tables
}
}
}
xxl-job-core/src/main/java/com/xxl/job/core/biz/impl/ExecutorBizImpl.java
View file @
35bceaac
...
@@ -54,7 +54,7 @@ public class ExecutorBizImpl implements ExecutorBiz {
...
@@ -54,7 +54,7 @@ public class ExecutorBizImpl implements ExecutorBiz {
return
ReturnT
.
SUCCESS
;
return
ReturnT
.
SUCCESS
;
}
}
return
new
ReturnT
<
String
>(
ReturnT
.
SUCCESS_CODE
,
"job thread aleady killed."
);
return
new
ReturnT
<
String
>(
ReturnT
.
SUCCESS_CODE
,
"job thread al
r
eady killed."
);
}
}
@Override
@Override
...
...
xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java
View file @
35bceaac
...
@@ -86,11 +86,15 @@ public class XxlJobExecutor {
...
@@ -86,11 +86,15 @@ public class XxlJobExecutor {
initRpcProvider
(
ip
,
port
,
appName
,
accessToken
);
initRpcProvider
(
ip
,
port
,
appName
,
accessToken
);
}
}
public
void
destroy
(){
public
void
destroy
(){
List
<
JobThread
>
runningThreads
=
new
ArrayList
<>(
jobThreadRepository
.
values
());
List
<
JobThread
>
runningThreads
=
new
ArrayList
<>(
jobThreadRepository
.
values
());
if
(
logger
.
isInfoEnabled
())
{
if
(
logger
.
isInfoEnabled
())
{
logger
.
info
(
"running threads {}"
,
runningThreads
);
logger
.
info
(
"running threads {}"
,
runningThreads
);
}
}
// destory executor-server
stopRpcProvider
();
// destory jobThreadRepository
// destory jobThreadRepository
if
(
jobThreadRepository
.
size
()
>
0
)
{
if
(
jobThreadRepository
.
size
()
>
0
)
{
for
(
Map
.
Entry
<
Integer
,
JobThread
>
item:
jobThreadRepository
.
entrySet
())
{
for
(
Map
.
Entry
<
Integer
,
JobThread
>
item:
jobThreadRepository
.
entrySet
())
{
...
@@ -116,9 +120,6 @@ public class XxlJobExecutor {
...
@@ -116,9 +120,6 @@ public class XxlJobExecutor {
// destory TriggerCallbackThread
// destory TriggerCallbackThread
TriggerCallbackThread
.
getInstance
().
toStop
();
TriggerCallbackThread
.
getInstance
().
toStop
();
// destory executor-server
stopRpcProvider
();
// destory invoker
// destory invoker
stopInvokerFactory
();
stopInvokerFactory
();
}
}
...
...
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