Commit 4d5c35fe by gdj

1.调整oss保存路径增加workspaceId。

2.修改航飞任务id为任务名称+时间。
parent 358b88a0
......@@ -94,13 +94,18 @@ public class WaylineJobServiceImpl extends ServiceImpl<IWaylineJobMapper, Waylin
return Optional.empty();
}
// Immediate tasks, allocating time on the backend.
LocalDateTime now = LocalDateTime.now();
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
String formattedDateTime = now.format(formatter);
String jobId = param.getName() + "-" + formattedDateTime+ "-" + UUID.randomUUID().toString().substring(0, 4);
WaylineJobEntity jobEntity = WaylineJobEntity.builder()
.name(param.getName())
.dockSn(param.getDockSn())
.fileId(param.getFileId())
.username(username)
.workspaceId(workspaceId)
.jobId(UUID.randomUUID().toString())
.jobId(jobId)
.beginTime(beginTime)
.endTime(endTime)
.status(WaylineJobStatusEnum.PENDING.getVal())
......@@ -121,7 +126,10 @@ public class WaylineJobServiceImpl extends ServiceImpl<IWaylineJobMapper, Waylin
return Optional.empty();
}
WaylineJobEntity jobEntity = this.dto2Entity(parentJobOpt.get());
jobEntity.setJobId(UUID.randomUUID().toString());
LocalDateTime now = LocalDateTime.now();
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
String formattedDateTime = now.format(formatter);
jobEntity.setJobId(jobEntity.getName() + "-" + formattedDateTime+ "-" + UUID.randomUUID().toString().substring(0, 4));
jobEntity.setErrorCode(null);
jobEntity.setCompletedTime(null);
jobEntity.setExecuteTime(null);
......
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