This commit is contained in:
2025-03-14 11:47:47 +08:00
parent c2ebbd71e2
commit 05bc2773b9
12 changed files with 205 additions and 50 deletions

View File

@ -128,7 +128,15 @@ public class VideoPieceGetter {
.values();
collection.forEach(faceSampleList -> {
executor.execute(() -> {
faceSampleList.parallelStream().forEach(faceSample -> {
AtomicBoolean isFirst = new AtomicBoolean(true);
faceSampleList.forEach(faceSample -> {
if (!isFirst.get()) {
try {
Thread.sleep(1000);
} catch (InterruptedException ignore) {
}
}
isFirst.set(false);
executor.execute(() -> {
DeviceEntity device = deviceRepository.getDevice(faceSample.getDeviceId());
DeviceConfigEntity config = deviceRepository.getDeviceConfig(faceSample.getDeviceId());