主动建thread
This commit is contained in:
parent
1ba4e6a9c3
commit
ee7249d63b
@ -123,10 +123,8 @@ public class VideoPieceGetter {
|
|||||||
})
|
})
|
||||||
.collect(Collectors.groupingBy(FaceSampleEntity::getDeviceId))
|
.collect(Collectors.groupingBy(FaceSampleEntity::getDeviceId))
|
||||||
.values();
|
.values();
|
||||||
collection
|
collection.forEach(faceSampleList -> {
|
||||||
.stream()
|
new Thread(() -> {
|
||||||
.parallel()
|
|
||||||
.forEach(faceSampleList -> {
|
|
||||||
faceSampleList.parallelStream().forEach(faceSample -> {
|
faceSampleList.parallelStream().forEach(faceSample -> {
|
||||||
DeviceEntity device = deviceRepository.getDevice(faceSample.getDeviceId());
|
DeviceEntity device = deviceRepository.getDevice(faceSample.getDeviceId());
|
||||||
DeviceConfigEntity config = deviceRepository.getDeviceConfig(faceSample.getDeviceId());
|
DeviceConfigEntity config = deviceRepository.getDeviceConfig(faceSample.getDeviceId());
|
||||||
@ -254,7 +252,8 @@ public class VideoPieceGetter {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
}).start();
|
||||||
|
});
|
||||||
if (task.faceId != null) {
|
if (task.faceId != null) {
|
||||||
taskStatusBiz.setFaceCutStatus(task.faceId, 1);
|
taskStatusBiz.setFaceCutStatus(task.faceId, 1);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user