mirror of
https://github.com/PowerJob/PowerJob.git
synced 2025-07-17 00:00:04 +08:00
fix: SQL Exception when there is no second task #111
This commit is contained in:
commit
6da82f92c7
@ -220,6 +220,9 @@ public class OmsScheduleService {
|
||||
try {
|
||||
// 查询所有的秒级任务(只包含ID)
|
||||
List<Long> jobIds = jobInfoRepository.findByAppIdInAndStatusAndTimeExpressionTypeIn(partAppIds, SwitchableStatus.ENABLE.getV(), TimeExpressionType.frequentTypes);
|
||||
if (CollectionUtils.isEmpty(jobIds)) {
|
||||
return;
|
||||
}
|
||||
// 查询日志记录表中是否存在相关的任务
|
||||
List<Long> runningJobIdList = instanceInfoRepository.findByJobIdInAndStatusIn(jobIds, InstanceStatus.generalizedRunningStatus);
|
||||
Set<Long> runningJobIdSet = Sets.newHashSet(runningJobIdList);
|
||||
|
Loading…
x
Reference in New Issue
Block a user