You've already forked FrameTour-BE
调整一下切片逻辑
This commit is contained in:
@ -181,26 +181,22 @@ 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) {
|
log.info("当前进度:!{}/{}", currentUnFinPlaceholder.size(), templatePlaceholder.size());
|
||||||
log.info("当前进度:!{}/{}", currentUnFinPlaceholder.size(), templatePlaceholder.size());
|
if (currentUnFinPlaceholder.isEmpty()) {
|
||||||
if (currentUnFinPlaceholder.isEmpty()) {
|
if (!invoke.get()) {
|
||||||
if (!invoke.get()) {
|
invoke.set(true);
|
||||||
invoke.set(true);
|
task.getCallback().onInvoke();
|
||||||
task.getCallback().onInvoke();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -210,6 +206,7 @@ public class VideoPieceGetter {
|
|||||||
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