You've already forked FrameTour-BE
修改
This commit is contained in:
@@ -316,8 +316,8 @@ public class TaskFaceServiceImpl implements TaskFaceService {
|
||||
listFaceEntitiesRequest.setOrder("asc");
|
||||
try {
|
||||
IAcsClient client = getClient();
|
||||
AtomicBoolean flag = new AtomicBoolean(false);
|
||||
while (true) {
|
||||
AtomicBoolean flag = new AtomicBoolean(false);
|
||||
ListFaceEntitiesResponse listFaceEntitiesResponse = client.getAcsResponse(listFaceEntitiesRequest);
|
||||
if (listFaceEntitiesResponse == null || listFaceEntitiesResponse.getData() == null || listFaceEntitiesResponse.getData().getEntities() == null || listFaceEntitiesResponse.getData().getEntities().isEmpty()) {
|
||||
break;
|
||||
@@ -346,6 +346,8 @@ public class TaskFaceServiceImpl implements TaskFaceService {
|
||||
});
|
||||
if (!flag.get()) {
|
||||
break;
|
||||
} else {
|
||||
flag.set(false);
|
||||
}
|
||||
}
|
||||
} catch (Exception ignored) {
|
||||
|
@@ -438,6 +438,8 @@ public class TaskTaskServiceImpl implements TaskService {
|
||||
}
|
||||
List<SourceEntity> videoSourceList = sourceMapper.listVideoByScenicFaceRelation(face.getScenicId(), faceId);
|
||||
Map<String, List<SourceEntity>> sourcesMap = videoSourceList.stream()
|
||||
.filter(Objects::nonNull)
|
||||
.filter(item -> Objects.nonNull(item.getVideoUrl()))
|
||||
.peek(item -> item.setUrl(item.getVideoUrl()))
|
||||
.filter(item -> {
|
||||
DeviceEntity device = deviceRepository.getDevice(item.getDeviceId());
|
||||
@@ -555,6 +557,7 @@ public class TaskTaskServiceImpl implements TaskService {
|
||||
video.setDuration(req.getVideoInfo().getDuration());
|
||||
}
|
||||
videoMapper.update(video);
|
||||
videoRepository.clearVideoCache(video.getId());
|
||||
} else {
|
||||
video = new VideoEntity();
|
||||
video.setId(SnowFlakeUtil.getLongId());
|
||||
|
Reference in New Issue
Block a user