TaskBulkUpdateByID performs an unconditional bulk UPDATE by primary key IDs. WARNING: This function has NO CAS (Compare-And-Swap) guard — it will overwrite any concurrent status changes. DO NOT use in billing/quota lifecycle flows (e.g., timeout, success, failure transitions that trigger refunds or
(ids []int64, params map[string]any)
| 448 | // (e.g., timeout, success, failure transitions that trigger refunds or settlements). |
| 449 | // For status transitions that involve billing, use Task.UpdateWithStatus() instead. |
| 450 | func TaskBulkUpdateByID(ids []int64, params map[string]any) error { |
| 451 | if len(ids) == 0 { |
| 452 | return nil |
| 453 | } |
| 454 | return DB.Model(&Task{}). |
| 455 | Where("id in (?)", ids). |
| 456 | Updates(params).Error |
| 457 | } |
| 458 | |
| 459 | type TaskQuotaUsage struct { |
| 460 | Mode string `json:"mode"` |
no outgoing calls
no test coverage detected