You've already forked FrameTour-BE
调整一下切片逻辑
This commit is contained in:
@ -181,14 +181,11 @@ public class VideoPieceGetter {
|
|||||||
.map(Map.Entry::getKey).forEach(pairDeviceId -> {
|
.map(Map.Entry::getKey).forEach(pairDeviceId -> {
|
||||||
log.info("找到同景区关联设备:{} -> {}", pairDeviceId, faceSample.getDeviceId());
|
log.info("找到同景区关联设备:{} -> {}", pairDeviceId, faceSample.getDeviceId());
|
||||||
if (pairDeviceId != null) {
|
if (pairDeviceId != null) {
|
||||||
executor.execute(() -> {
|
|
||||||
doCut(pairDeviceId, faceSample.getId(), faceSample.getCreateAt(), task);
|
doCut(pairDeviceId, faceSample.getId(), faceSample.getCreateAt(), task);
|
||||||
currentUnFinPlaceholder.remove(faceSample.getDeviceId().toString());
|
currentUnFinPlaceholder.remove(faceSample.getDeviceId().toString());
|
||||||
});
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
executor.execute(() -> {
|
|
||||||
doCut(faceSample.getDeviceId(), faceSample.getId(), faceSample.getCreateAt(), task);
|
doCut(faceSample.getDeviceId(), faceSample.getId(), faceSample.getCreateAt(), task);
|
||||||
currentUnFinPlaceholder.remove(faceSample.getDeviceId().toString());
|
currentUnFinPlaceholder.remove(faceSample.getDeviceId().toString());
|
||||||
if (templatePlaceholder != null) {
|
if (templatePlaceholder != null) {
|
||||||
@ -203,13 +200,13 @@ public class VideoPieceGetter {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
|
||||||
try {
|
try {
|
||||||
Thread.sleep(1000L);
|
Thread.sleep(1000L);
|
||||||
log.info("executor等待被结束![A:{}/T:{}/F:{}]", executor.getActiveCount(), executor.getTaskCount(), executor.getCompletedTaskCount());
|
log.info("executor等待被结束![A:{}/T:{}/F:{}]", executor.getActiveCount(), executor.getTaskCount(), executor.getCompletedTaskCount());
|
||||||
executor.shutdown();
|
executor.shutdown();
|
||||||
executor.awaitTermination(5, TimeUnit.MINUTES);
|
executor.awaitTermination(5, TimeUnit.MINUTES);
|
||||||
log.info("executor已结束![A:{}/T:{}/F:{}]", executor.getActiveCount(), executor.getTaskCount(), executor.getCompletedTaskCount());
|
log.info("executor已结束![A:{}/T:{}/F:{}]", executor.getActiveCount(), executor.getTaskCount(), executor.getCompletedTaskCount());
|
||||||
|
executor.close();
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
return;
|
return;
|
||||||
} finally {
|
} finally {
|
||||||
|
Reference in New Issue
Block a user