Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
粉色的八爪鱼
xxl-job
提交
79279050
X
xxl-job
项目概览
粉色的八爪鱼
/
xxl-job
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
X
xxl-job
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
79279050
编写于
11月 13, 2019
作者:
许雪里
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update document
上级
aebb7b73
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
3 addition
and
8 deletion
+3
-8
xxl-job-admin/src/main/java/com/xxl/job/admin/core/thread/JobScheduleHelper.java
...java/com/xxl/job/admin/core/thread/JobScheduleHelper.java
+2
-7
xxl-job-admin/src/main/resources/mybatis-mapper/XxlJobInfoMapper.xml
...in/src/main/resources/mybatis-mapper/XxlJobInfoMapper.xml
+1
-1
未找到文件。
xxl-job-admin/src/main/java/com/xxl/job/admin/core/thread/JobScheduleHelper.java
浏览文件 @
79279050
...
@@ -88,20 +88,15 @@ public class JobScheduleHelper {
...
@@ -88,20 +88,15 @@ public class JobScheduleHelper {
}
else
if
(
nowTime
>
jobInfo
.
getTriggerNextTime
())
{
}
else
if
(
nowTime
>
jobInfo
.
getTriggerNextTime
())
{
// 2.2、trigger-expire < 5s:direct-trigger && make next-trigger-time
// 2.2、trigger-expire < 5s:direct-trigger && make next-trigger-time
CronExpression
cronExpression
=
new
CronExpression
(
jobInfo
.
getJobCron
());
long
nextTime
=
cronExpression
.
getNextValidTimeAfter
(
new
Date
()).
getTime
();
// 1、trigger
// 1、trigger
JobTriggerPoolHelper
.
trigger
(
jobInfo
.
getId
(),
TriggerTypeEnum
.
CRON
,
-
1
,
null
,
null
);
JobTriggerPoolHelper
.
trigger
(
jobInfo
.
getId
(),
TriggerTypeEnum
.
CRON
,
-
1
,
null
,
null
);
logger
.
debug
(
">>>>>>>>>>> xxl-job, shecule push trigger : jobId = "
+
jobInfo
.
getId
()
);
logger
.
debug
(
">>>>>>>>>>> xxl-job, shecule push trigger : jobId = "
+
jobInfo
.
getId
()
);
// 2、fresh next
// 2、fresh next
jobInfo
.
setTriggerLastTime
(
jobInfo
.
getTriggerNextTime
());
refreshNextValidTime
(
jobInfo
,
new
Date
(
jobInfo
.
getTriggerNextTime
()));
jobInfo
.
setTriggerNextTime
(
nextTime
);
// next-trigger-time in 5s, pre-read again
// next-trigger-time in 5s, pre-read again
if
(
jobInfo
.
getTrigger
NextTime
()
-
nowTime
<
PRE_READ_MS
)
{
if
(
jobInfo
.
getTrigger
Status
()==
1
&&
nowTime
+
PRE_READ_MS
>
jobInfo
.
getTriggerNextTime
()
)
{
// 1、make ring second
// 1、make ring second
int
ringSecond
=
(
int
)((
jobInfo
.
getTriggerNextTime
()/
1000
)%
60
);
int
ringSecond
=
(
int
)((
jobInfo
.
getTriggerNextTime
()/
1000
)%
60
);
...
...
xxl-job-admin/src/main/resources/mybatis-mapper/XxlJobInfoMapper.xml
浏览文件 @
79279050
...
@@ -212,7 +212,7 @@
...
@@ -212,7 +212,7 @@
SELECT
<include
refid=
"Base_Column_List"
/>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM xxl_job_info AS t
FROM xxl_job_info AS t
WHERE t.trigger_status = 1
WHERE t.trigger_status = 1
and t.trigger_next_time
<![CDATA[ <= ]]>
#{maxNextTime}
and t.trigger_next_time
<![CDATA[ <= ]]>
#{maxNextTime}
</select>
</select>
<update
id=
"scheduleUpdate"
parameterType=
"com.xxl.job.admin.core.model.XxlJobInfo"
>
<update
id=
"scheduleUpdate"
parameterType=
"com.xxl.job.admin.core.model.XxlJobInfo"
>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录