You've already forked FrameTour-BE
调整一下切片逻辑
This commit is contained in:
@ -181,26 +181,22 @@ public class VideoPieceGetter {
|
||||
.map(Map.Entry::getKey).forEach(pairDeviceId -> {
|
||||
log.info("找到同景区关联设备:{} -> {}", pairDeviceId, faceSample.getDeviceId());
|
||||
if (pairDeviceId != null) {
|
||||
executor.execute(() -> {
|
||||
doCut(pairDeviceId, faceSample.getId(), faceSample.getCreateAt(), task);
|
||||
currentUnFinPlaceholder.remove(faceSample.getDeviceId().toString());
|
||||
});
|
||||
doCut(pairDeviceId, faceSample.getId(), faceSample.getCreateAt(), task);
|
||||
currentUnFinPlaceholder.remove(faceSample.getDeviceId().toString());
|
||||
}
|
||||
});
|
||||
}
|
||||
executor.execute(() -> {
|
||||
doCut(faceSample.getDeviceId(), faceSample.getId(), faceSample.getCreateAt(), task);
|
||||
currentUnFinPlaceholder.remove(faceSample.getDeviceId().toString());
|
||||
if (templatePlaceholder != null) {
|
||||
log.info("当前进度:!{}/{}", currentUnFinPlaceholder.size(), templatePlaceholder.size());
|
||||
if (currentUnFinPlaceholder.isEmpty()) {
|
||||
if (!invoke.get()) {
|
||||
invoke.set(true);
|
||||
task.getCallback().onInvoke();
|
||||
}
|
||||
doCut(faceSample.getDeviceId(), faceSample.getId(), faceSample.getCreateAt(), task);
|
||||
currentUnFinPlaceholder.remove(faceSample.getDeviceId().toString());
|
||||
if (templatePlaceholder != null) {
|
||||
log.info("当前进度:!{}/{}", currentUnFinPlaceholder.size(), templatePlaceholder.size());
|
||||
if (currentUnFinPlaceholder.isEmpty()) {
|
||||
if (!invoke.get()) {
|
||||
invoke.set(true);
|
||||
task.getCallback().onInvoke();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
@ -210,6 +206,7 @@ public class VideoPieceGetter {
|
||||
executor.shutdown();
|
||||
executor.awaitTermination(5, TimeUnit.MINUTES);
|
||||
log.info("executor已结束![A:{}/T:{}/F:{}]", executor.getActiveCount(), executor.getTaskCount(), executor.getCompletedTaskCount());
|
||||
executor.close();
|
||||
} catch (InterruptedException e) {
|
||||
return;
|
||||
} finally {
|
||||
|
Reference in New Issue
Block a user