fix(pipeline): immediate 模式下上传文件未标记 Metadata[uploaded]
Metadata[uploaded] 的设置在 if !uploadFailed && uploadTiming != 'immediate' 块内,immediate 模式下整个块被跳过,uploaded 文件从未被标记。 extractUploadedDetails 读取 LastStageFiles 时找不到 uploaded 标记, 通知回退到无上传标注的格式。 修复:在上传循环中上传成功时立即设置 Metadata[uploaded] = true, 不依赖后续删除逻辑块。同时修复 cleanupOrphanedAssFiles 未检查 .ass 是否已被 deleteMarkedFiles 删除的问题。 Co-Authored-By: Kscc <noreply@owtffssent.com>
This commit is contained in:
1 parent
4fbbd52f32
commit
e52df5b4f9
1 file changed
+5
@@ -320,6 +320,11 @@ func (s *CloudUploadStage) Execute(ctx *pipeline.PipelineContext, input []pipeli
|
||||
|
||||
s.logs += fmt.Sprintf("上传成功: %s -> %s/%s\n", fileName, s.storageName, targetPath)
|
||||
ctx.Logger.Infof("文件上传成功: %s -> %s/%s", fileName, s.storageName, targetPath)
|
||||
// 标记已上传(立即设置,不依赖后续删除逻辑块,确保 immediate 模式下也有标记)
|
||||
if file.Metadata == nil {
|
||||
file.Metadata = map[string]any{}
|
||||
}
|
||||
file.Metadata["uploaded"] = true
|
||||
uploadedIndices[len(output)] = true // 记录上传成功的文件索引
|
||||
output = append(output, file)
|
||||
|
||||
|
||||
Reference in new issue
Block a user