Skip to content

Commit

Permalink
fix(cloud-storage): call convertFinish after query status (#1666)
Browse files Browse the repository at this point in the history
  • Loading branch information
crimx committed Aug 25, 2022
1 parent 3de410f commit 03070e3
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CloudFile, FileConvertStep } from "@netless/flat-server-api";
import { CloudFile, convertFinish, FileConvertStep } from "@netless/flat-server-api";
import { errorTips, FileUUID } from "flat-components";
import { SideEffectManager } from "side-effect-manager";
import { getFileExt } from "../utils/file";
Expand Down Expand Up @@ -51,6 +51,11 @@ export class ConvertStatusManager {
result.status === FileConvertStep.Done ||
result.status === FileConvertStep.Failed
) {
try {
await convertFinish({ fileUUID: file.fileUUID, region: file.region });
} catch (e) {
console.error(e);
}
runInAction(() => {
file.convertStep = result.status;
});
Expand Down

0 comments on commit 03070e3

Please sign in to comment.