优化异步导出,修复临时目录清理逻辑

This commit is contained in:
renzhiyuan 2025-12-25 17:09:41 +08:00
parent 2e6e665984
commit 079a16bdb7
1 changed files with 4 additions and 1 deletions

View File

@ -151,7 +151,10 @@ func (e *ExportAsync) Run(ctx context.Context) (string, error) {
e.logTool.Errorf("导出panic\n任务%s,错误原因:%s", e.task.Id, _err)
}
e.release()
os.RemoveAll(tempDir)
if e.uploader.Host != "" {
os.RemoveAll(tempDir)
}
cancel()
}()
source, err := e.export(subCtx, tempDir)