Skip to content

Commit d9e97b9

Browse files
committed
Add Abekas RAW
1 parent 7d3b3d9 commit d9e97b9

File tree

4 files changed

+41
-1
lines changed

4 files changed

+41
-1
lines changed

workflows/ingest/masters.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ func uploadMaster(ctx workflow.Context, params MasterParams) (*MasterResult, err
179179
return acc + err.Error() + "\n"
180180
}, "")
181181

182-
return nil, fmt.Errorf(errText)
182+
return nil, fmt.Errorf("%s", errText)
183183
}
184184

185185
parentAbandonOptions := workflow.GetChildWorkflowOptions(ctx)

workflows/vb_export/vb_export.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ type Destination enum.Member[string]
2525

2626
var (
2727
DestinationAbekas = Destination{Value: "abekas"}
28+
DestinationRawAbekas = Destination{Value: "raw-abekas"}
2829
DestinationBStage = Destination{Value: "b-stage"}
2930
DestinationHyperdeck = Destination{Value: "hyperdeck"}
3031
DestinationGfx = Destination{Value: "gfx"}
@@ -34,6 +35,7 @@ var (
3435
DestinationXDCAM = Destination{Value: "xdcam"}
3536
Destinations = enum.New(
3637
DestinationAbekas,
38+
DestinationRawAbekas,
3739
DestinationBStage,
3840
DestinationGfx,
3941
DestinationHippo,
@@ -202,6 +204,8 @@ func VBExport(ctx workflow.Context, params VBExportParams) ([]wfutils.ResultOrEr
202204
switch *dest {
203205
case DestinationAbekas:
204206
w = VBExportToAbekas
207+
case DestinationRawAbekas:
208+
w = VBExportToRawAbekas
205209
case DestinationBStage:
206210
w = VBExportToBStage
207211
case DestinationHyperdeck:
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
package vb_export
2+
3+
import (
4+
"github.com/bcc-code/bcc-media-flows/services/rclone"
5+
"github.com/bcc-code/bcc-media-flows/services/telegram"
6+
wfutils "github.com/bcc-code/bcc-media-flows/utils/workflows"
7+
"go.temporal.io/sdk/workflow"
8+
)
9+
10+
// VBExportToRawAbekas copies the input file directly to Abekas-RAW without transcoding.
11+
func VBExportToRawAbekas(ctx workflow.Context, params VBExportChildWorkflowParams) (*VBExportResult, error) {
12+
logger := workflow.GetLogger(ctx)
13+
logger.Info("Starting ExportToRawAbekas")
14+
15+
ctx = workflow.WithActivityOptions(ctx, wfutils.GetDefaultActivityOptions())
16+
17+
rcloneDestination := deliveryFolder.Append("Abekas-RAW", params.InputFile.Base())
18+
19+
err := wfutils.RcloneWaitForFileGone(ctx, rcloneDestination, telegram.ChatOslofjord, 10)
20+
if err != nil {
21+
return nil, err
22+
}
23+
24+
err = wfutils.RcloneCopyFileWithNotifications(ctx, params.InputFile, rcloneDestination, rclone.PriorityHigh, rcloneNotificationOptions)
25+
if err != nil {
26+
return nil, err
27+
}
28+
29+
notifyExportDone(ctx, params, "raw-abekas", params.InputFile)
30+
31+
return &VBExportResult{
32+
ID: params.ParentParams.VXID,
33+
Title: params.OriginalFilenameWithoutExt,
34+
}, nil
35+
}

workflows/workflows.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ var WorkerWorkflows = []any{
7272
miscworkflows.FixDurationVX,
7373
vb_export.VBExport,
7474
vb_export.VBExportToAbekas,
75+
vb_export.VBExportToRawAbekas,
7576
vb_export.VBExportToBStage,
7677
vb_export.VBExportToGfx,
7778
vb_export.VBExportToHippo,

0 commit comments

Comments
 (0)