REQ-3540: 更新文件大小
This commit is contained in:
parent
49f687859c
commit
884989f61f
@ -56,6 +56,8 @@ import cn.azxo.framework.common.model.Page;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
/**
|
||||
* @author yanglin
|
||||
*/
|
||||
@ -118,7 +120,7 @@ public class FileDatabaseService {
|
||||
asyncUtils.getOrTimeout(future, "激活");
|
||||
}
|
||||
|
||||
private Future<?> asyncCopySubtree(FileDatabase db, IndexNode templateRoot, Runnable nullablePostProcessor) {
|
||||
private Future<?> asyncCopySubtree(FileDatabase db, IndexNode templateRoot, @Nullable Runnable postProcessor) {
|
||||
return indexManager.async(() -> {
|
||||
// don't inline in transaction
|
||||
CopiedOssFiles copiedOssFiles = indexManager.copySubtreeOssFiles(templateRoot);
|
||||
@ -129,8 +131,8 @@ public class FileDatabaseService {
|
||||
indexManager.copySubTree(templateRoot, null, new SetScopeCopyFileVisitor(copiedOssFiles, db));
|
||||
fileDatabaseDao.updateState(db.getCode(), FileDatabaseState.ACTIVATED);
|
||||
fileDatabaseDao.setPurchaseTime(db.getCode(), new Date());
|
||||
if (nullablePostProcessor != null)
|
||||
nullablePostProcessor.run();
|
||||
if (postProcessor != null)
|
||||
postProcessor.run();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user