From 8878f00c5db235b2388cad1ea432838a77cc4c24 Mon Sep 17 00:00:00 2001
From: chausman <chausman@nrao.edu>
Date: Thu, 26 Oct 2023 12:59:23 -0600
Subject: [PATCH] update ngas flag determination

---
 .../ingest_envoy/ingestion_manifest.py            | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/apps/cli/executables/pexable/ingest_envoy/ingest_envoy/ingestion_manifest.py b/apps/cli/executables/pexable/ingest_envoy/ingest_envoy/ingestion_manifest.py
index d0cd76027..4f29b790d 100644
--- a/apps/cli/executables/pexable/ingest_envoy/ingest_envoy/ingestion_manifest.py
+++ b/apps/cli/executables/pexable/ingest_envoy/ingest_envoy/ingestion_manifest.py
@@ -105,12 +105,15 @@ class IngestionManifest(ManifestComponentIF):
     def get_ngas_flag(self) -> bool:
         """Determine and retrieve the correct ingestNGAS flag for this type of ingestion/curation"""
 
-        # default to true for all types
-        flag = True
-        # TODO: Add properties for other types
-        if self.sp_type == ScienceProductType.EXEC_BLOCK:
-            if self.telescope == Telescope.VLBA or self.telescope == Telescope.GMVA:
-                flag = CapoConfig().getboolean("archive-ingestion.ingestNGAS")
+        match self.sp_type:
+            case ScienceProductType.EXEC_BLOCK:
+                flag = CapoConfig().getboolean("archive-ingestion.ingestNGAS.observation")
+            case ScienceProductType.EVLA_CAL:
+                flag = CapoConfig().getboolean("archive-ingestion.ingestNGAS.calibration")
+            case ScienceProductType.IMAGE | ScienceProductType.VLASS_SECI:
+                flag = CapoConfig().getboolean("archive-ingestion.ingestNGAS.imaging")
+            case _:
+                flag = True
 
         return flag
 
-- 
GitLab