Commit 7d36f48b by gdj

修复空中下发bug

parent 48cc8380
......@@ -735,6 +735,10 @@ public class FlightTaskServiceImpl extends AbstractWaylineService implements IFl
private void addConditionsInFlight(WaylineJobDTO waylineJob, CreateInFlightJobParam param, Long beginTime, Long endTime) {
if (TaskTypeEnum.CONDITIONAL != param.getTaskType()) {
return;
}
waylineJob.setConditions(
WaylineTaskConditionDTO.builder()
// .executableConditions(Objects.nonNull(param.getMinStorageCapacity()) ?
......@@ -768,15 +772,16 @@ public class FlightTaskServiceImpl extends AbstractWaylineService implements IFl
boolean isSuccess = this.prepareInFlightTask(waylineJob);
if (!isSuccess) {
return HttpResultResponse.error("Failed to prepare job.");
return HttpResultResponse.error("Failed to prepare In flight job.");
}
// Issue an immediate task execution command.
if (TaskTypeEnum.IMMEDIATE == waylineJob.getTaskType()) {
if (!executeFlightTask(waylineJob.getWorkspaceId(), waylineJob.getJobId())) {
return HttpResultResponse.error("Failed to execute job.");
}
}
// 不需要执行这个就可以直接起飞
// if (TaskTypeEnum.IMMEDIATE == waylineJob.getTaskType()) {
// if (!executeFlightTask(waylineJob.getWorkspaceId(), waylineJob.getJobId())) {
// return HttpResultResponse.error("Failed to execute job.");
// }
// }
// 发送 邮件
// this.sendCreatedTaskMail(waylineJob);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment