refactor(workflow): 统一 OSS 接口并重构恢复锁
- 将文件地址前缀与上传逻辑迁移至 common/oss - 恢复执行改用 utils.WithLock 自动续期锁 - 转写提示词增加单镜头最小时长约束
This commit is contained in:
@@ -8,7 +8,7 @@ import (
|
||||
"time"
|
||||
|
||||
commonHttp "gitea.redpowerfuture.com/red-future/common/http"
|
||||
"gitea.redpowerfuture.com/red-future/common/utils"
|
||||
"gitea.redpowerfuture.com/red-future/common/oss"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
)
|
||||
@@ -300,7 +300,7 @@ func normalizeVideoURL(ctx context.Context, url string) string {
|
||||
if url == "" || strings.HasPrefix(url, "http") {
|
||||
return url
|
||||
}
|
||||
prefix, err := utils.GetFileAddressPrefix(ctx)
|
||||
prefix, err := oss.GetFileAddressPrefix(ctx)
|
||||
if err != nil {
|
||||
g.Log().Warningf(ctx, "获取文件前缀失败,视频地址保持相对路径: %s err=%v", url, err)
|
||||
return url
|
||||
|
||||
Reference in New Issue
Block a user