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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user