diff --git a/apps/cli/executables/go/gmva_ingester/README.md b/apps/cli/executables/go/gmva_ingester/README.md index 55c288560b7f9315c0c5b48d53b112eda7f6d249..b14b9b730876b6953ad536cee1f1bb4ed58d8092 100644 --- a/apps/cli/executables/go/gmva_ingester/README.md +++ b/apps/cli/executables/go/gmva_ingester/README.md @@ -1,7 +1,7 @@ # gmva_ingester `gmva_ingester` is a utility that copies GMVA observation directories from the -GMVA source directory (defined in CAPO) to the VLBI ingestion staging directory +GMVA source directory (defined in CAPO) to the difx directory (also defined in CAPO). It is not meant to be run by hand, but by a workflow that facilitates the entire GMVA observation ingestion process. @@ -9,5 +9,5 @@ that facilitates the entire GMVA observation ingestion process. ``` Usage of ./gmva_ingester: -dir string - Name of the GMVA directory within the GMVA source directory to be copied to the VLBI staging directory + Name of the GMVA directory within the GMVA source directory to be copied to the difx directory ``` diff --git a/apps/cli/executables/go/gmva_ingester/main.go b/apps/cli/executables/go/gmva_ingester/main.go index ebd6a8717b2d789a074ce2d856e4f6f0f66fae7c..90cb1cabbd9b7308c5086b7dc7957b2afe1ccfa5 100644 --- a/apps/cli/executables/go/gmva_ingester/main.go +++ b/apps/cli/executables/go/gmva_ingester/main.go @@ -28,7 +28,7 @@ import ( func main() { var gmvaDir string - flag.StringVar(&gmvaDir, "dir", "", "Name of the GMVA directory within the GMVA source directory to be copied to the VLBI staging directory") + flag.StringVar(&gmvaDir, "dir", "", "Name of the GMVA directory within the GMVA source directory to be copied to the difx directory") flag.Parse() if gmvaDir == "" { diff --git a/apps/cli/executables/go/gmva_ingester/pkg/copy/copy_gmva.go b/apps/cli/executables/go/gmva_ingester/pkg/copy/copy_gmva.go index 759cccfc7b67805e04720d6c01b549bdb5958900..f904f4a6b98d1cb8a7c8a8b8ccada451684241b5 100644 --- a/apps/cli/executables/go/gmva_ingester/pkg/copy/copy_gmva.go +++ b/apps/cli/executables/go/gmva_ingester/pkg/copy/copy_gmva.go @@ -50,9 +50,10 @@ func CopyGmva(dir string) { capoProperties, err := config.InitConfig(os.Getenv("CAPO_PROFILE"), helpers.DefaultCapoPath) checkError(err) - ingestionSettings := capoProperties.SettingsForPrefix("edu.nrao.workspaces.IngestionSettings") - gmvaSourcePath := ingestionSettings.GetString("gmvaSourceDirectory") - vlbiStagingPath := ingestionSettings.GetString("vlbiStagingDirectory") + wsIngestionSettings := capoProperties.SettingsForPrefix("edu.nrao.workspaces.IngestionSettings") + gmvaSourcePath := wsIngestionSettings.GetString("gmvaSourceDirectory") + aatIngestionSettings := capoProperties.SettingsForPrefix("archive-ingestion") + difxPath := aatIngestionSettings.GetString("VLBAPath") // GMVA source only copies files starting with GMVA gmvaSourceFiles := strings.Join([]string{gmvaSourcePath, dir, "GMVA*"}, "/") @@ -60,15 +61,15 @@ func CopyGmva(dir string) { gmvaSourcePaths, err = filepath.Glob(gmvaSourceFiles) checkError(err) - vlbiTargetDir := strings.Join([]string{vlbiStagingPath, dir}, "/") + difxDir := strings.Join([]string{difxPath, dir}, "/") // First make the directory to copy files to - mkdirCmd := exec.Command("mkdir", vlbiTargetDir) + mkdirCmd := exec.Command("mkdir", difxDir) err = mkdirCmd.Run() checkError(err) for _, path := range gmvaSourcePaths { - copyCmd := exec.Command("cp", "-LR", path, vlbiTargetDir) + copyCmd := exec.Command("cp", "-LR", path, difxDir) err = copyCmd.Run() checkError(err) }