1
0
forked from aixan/RuoYi-Vue

优化任务过期不执行调度

This commit is contained in:
RuoYi
2022-07-29 20:28:59 +08:00
parent b91c848962
commit 250c5ba226
4 changed files with 19 additions and 7 deletions

View File

@@ -167,8 +167,8 @@ public class SysJobController extends BaseController
@PutMapping("/run")
public AjaxResult run(@RequestBody SysJob job) throws SchedulerException
{
jobService.run(job);
return AjaxResult.success();
boolean result = jobService.run(job);
return result ? success() : error("任务不存在或已过期!");
}
/**
@@ -180,6 +180,6 @@ public class SysJobController extends BaseController
public AjaxResult remove(@PathVariable Long[] jobIds) throws SchedulerException, TaskException
{
jobService.deleteJobByIds(jobIds);
return AjaxResult.success();
return success();
}
}