支持远程url吗

This commit is contained in:
2026-07-16 00:50:27 +08:00
parent 7a781fecfc
commit 60be9201e5
12 changed files with 379 additions and 131 deletions
+10
View File
@@ -552,6 +552,16 @@ func (r *EventRepository) MarkVideoReady(ctx context.Context, eventID, fileURL s
return res.Error
}
// SetFile stores an arbitrary file reference (relative path OR upstream URL) on
// an event WITHOUT touching status/counters — used for already-succeeded no-store
// events whose auth-gated upstream URL is proxied on demand.
func (r *EventRepository) SetFile(ctx context.Context, eventID, fileURL string) error {
return r.db.WithContext(ctx).
Model(&model.EventLog{}).
Where("id = ?", eventID).
Update("file", fileURL).Error
}
func (r *EventRepository) UpdateStatus(ctx context.Context, eventID, status, errMsg string, elapsedMS int) error {
patch := map[string]any{
"status": status,