feat:解决定时器启动时卡死问题
This commit is contained in:
parent
d39247d991
commit
9b9af8a481
|
@ -66,7 +66,9 @@ public class QuartzJobServiceImpl extends ServiceImpl<QuartzJobMapper, QuartzJob
|
|||
@Override
|
||||
@Transactional(rollbackFor = JeecgBootException.class)
|
||||
public boolean resumeJob(QuartzJob quartzJob) {
|
||||
schedulerDelete(quartzJob.getId());
|
||||
if (CommonConstant.STATUS_NORMAL.equals(quartzJob.getStatus())) {
|
||||
schedulerDelete(quartzJob.getId());
|
||||
}
|
||||
schedulerAdd(quartzJob.getId(), quartzJob.getJobClassName().trim(), quartzJob.getCronExpression().trim(), quartzJob.getParameter());
|
||||
quartzJob.setStatus(CommonConstant.STATUS_NORMAL);
|
||||
return this.updateById(quartzJob);
|
||||
|
@ -74,7 +76,7 @@ public class QuartzJobServiceImpl extends ServiceImpl<QuartzJobMapper, QuartzJob
|
|||
|
||||
/**
|
||||
* 编辑&启停定时任务
|
||||
* @throws SchedulerException
|
||||
* @throws SchedulerException
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = JeecgBootException.class)
|
||||
|
@ -163,7 +165,7 @@ public class QuartzJobServiceImpl extends ServiceImpl<QuartzJobMapper, QuartzJob
|
|||
|
||||
/**
|
||||
* 删除定时任务
|
||||
*
|
||||
*
|
||||
* @param id
|
||||
*/
|
||||
private void schedulerDelete(String id) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user