fix: 任务差额结算后 quota 和阿里视频时长优化 (#5923)

* fix: apply default ali video duration when value is non-positive

* fix: persist task quota after async settlement
This commit is contained in:
feitianbubu
2026-07-06 11:49:24 +08:00
committed by GitHub
parent 2281c9e3d8
commit 043720f9be
3 changed files with 9 additions and 1 deletions
+4
View File
@@ -417,6 +417,10 @@ func (Task *Task) Update() error {
return err
}
func (t *Task) UpdateQuota() error {
return DB.Model(t).Update("quota", t.Quota).Error
}
// UpdateWithStatus performs a conditional UPDATE guarded by fromStatus (CAS).
// Returns (true, nil) if this caller won the update, (false, nil) if
// another process already moved the task out of fromStatus.