From 0e4b200720d1420e68ba83dede591a752b3e5596 Mon Sep 17 00:00:00 2001 From: Alexander Onnikov Date: Thu, 3 Jul 2025 18:39:06 +0700 Subject: [PATCH] UBERF-12153 Transcode only created blobs Signed-off-by: Alexander Onnikov --- internal/pkg/queue/queue.go | 10 ++++++---- internal/pkg/queue/worker.go | 1 + 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/internal/pkg/queue/queue.go b/internal/pkg/queue/queue.go index d9f6a54208..b79786f67d 100644 --- a/internal/pkg/queue/queue.go +++ b/internal/pkg/queue/queue.go @@ -36,14 +36,16 @@ type TranscodeRequest struct { BlobID string WorkspaceUUID string ContentType string + Source map[string]any } // TranscodeResult represents transcode result. type TranscodeResult struct { - BlobID string `json:"blobId"` - WorkspaceUUID string `json:"workspaceUuid"` - Playlist string `json:"playlist"` - Thumbnail string `json:"thumbnail"` + BlobID string `json:"blobId"` + WorkspaceUUID string `json:"workspaceUuid"` + Source map[string]any `json:"source"` + Playlist string `json:"playlist"` + Thumbnail string `json:"thumbnail"` } // ConsumerOptions represents options for the consumer diff --git a/internal/pkg/queue/worker.go b/internal/pkg/queue/worker.go index 60def900d5..a80b4c702a 100644 --- a/internal/pkg/queue/worker.go +++ b/internal/pkg/queue/worker.go @@ -115,6 +115,7 @@ func (w *Worker) processMessage(ctx context.Context, msg kafka.Message, logger * result := TranscodeResult{ BlobID: req.BlobID, WorkspaceUUID: req.WorkspaceUUID, + Source: req.Source, Playlist: res.Playlist, Thumbnail: res.Thumbnail, }