From cae59a638a71a024d865228bccaa2db018934b07 Mon Sep 17 00:00:00 2001 From: Mike Cantelon Date: Tue, 14 May 2024 00:46:37 -0700 Subject: [PATCH] work --- cmd/worker/workercmd/cmd.go | 4 ++++ internal/workflow/preprocessing.go | 10 ++++++++++ 2 files changed, 14 insertions(+) diff --git a/cmd/worker/workercmd/cmd.go b/cmd/worker/workercmd/cmd.go index 2aa2522d..c4195d7b 100644 --- a/cmd/worker/workercmd/cmd.go +++ b/cmd/worker/workercmd/cmd.go @@ -70,6 +70,10 @@ func (m *Main) Run(ctx context.Context) error { activities.NewMetadataValidationActivity().Execute, temporalsdk_activity.RegisterOptions{Name: activities.MetadataValidationName}, ) + w.RegisterActivityWithOptions( + activities.CombinePremisActivity().Execute, + temporalsdk_activity.RegisterOptions{Name: activities.CombinePremisName}, + ) w.RegisterActivityWithOptions( activities.NewSipCreationActivity().Execute, temporalsdk_activity.RegisterOptions{Name: activities.SipCreationName}, diff --git a/internal/workflow/preprocessing.go b/internal/workflow/preprocessing.go index 40be3d33..c97aedc1 100644 --- a/internal/workflow/preprocessing.go +++ b/internal/workflow/preprocessing.go @@ -102,6 +102,16 @@ func (w *PreprocessingWorkflow) Execute( return nil, e } + // Combine PREMIS files into one + var combinePremis activities.CombinePremisResult + e = temporalsdk_workflow.ExecuteActivity(withLocalActOpts(ctx), activities.CombinePremisName, &activities.CombinePremisParams{ + SipPath: localPath, + }). + Get(ctx, &combinePremis) + if e != nil { + return nil, e + } + // Repackage SFA SIP into a Bag. var sipCreation activities.SipCreationResult e = temporalsdk_workflow.ExecuteActivity(withLocalActOpts(ctx), activities.SipCreationName, &activities.SipCreationParams{