mirror of
https://github.com/PowerJob/PowerJob.git
synced 2025-07-17 00:00:04 +08:00
feat: throw exception when can't find retry instance's job
This commit is contained in:
parent
7feb4fc84e
commit
f5ccbbb8cc
@ -97,12 +97,6 @@ public class DispatchService {
|
||||
log.info("[Dispatcher-{}|{}] cancel dispatch due to instance has been dispatched", jobId, instanceId);
|
||||
return;
|
||||
}
|
||||
// 任务信息已经被删除
|
||||
if (jobInfo.getId() == null) {
|
||||
log.warn("[Dispatcher-{}|{}] cancel dispatch due to job(id={}) has been deleted!", jobId, instanceId, jobId);
|
||||
instanceManager.processFinishedInstance(instanceId, instanceInfo.getWfInstanceId(), FAILED, "can't find job by id " + jobId);
|
||||
return;
|
||||
}
|
||||
|
||||
Date now = new Date();
|
||||
String dbInstanceParams = instanceInfo.getInstanceParams() == null ? "" : instanceInfo.getInstanceParams();
|
||||
|
@ -420,7 +420,7 @@ public class WorkflowInstanceManager {
|
||||
*/
|
||||
private void runInstance(PEWorkflowDAG.Node node) {
|
||||
|
||||
JobInfoDO jobInfo = jobInfoRepository.findById(node.getJobId()).orElseGet(JobInfoDO::new);
|
||||
JobInfoDO jobInfo = jobInfoRepository.findById(node.getJobId()).orElseThrow(() -> new PowerJobException("can't find job by jobId:" + node.getJobId()));
|
||||
// 洗去时间表达式类型
|
||||
jobInfo.setTimeExpressionType(TimeExpressionType.WORKFLOW.getV());
|
||||
dispatchService.dispatch(jobInfo, node.getInstanceId());
|
||||
|
Loading…
x
Reference in New Issue
Block a user