Skip to content
Snippets Groups Projects
Commit 5634d2e8 authored by Daniel Nemergut's avatar Daniel Nemergut
Browse files

Setting ngas_ingest=False when archive-ingestion.skipNGAS=true exists in the...

Setting ngas_ingest=False when archive-ingestion.skipNGAS=true exists in the capo config, otherwise defaults to ngas_ingest=True (current behavior)
parent fec9e21b
No related branches found
No related tags found
1 merge request!1474Disable NGAS ingest via a capo setting
Pipeline #12168 passed
......@@ -21,6 +21,7 @@ import logging
import sys
import tarfile
from pathlib import Path
from pycapo import CapoConfig
# pylint: disable=C0301, E0401, R0903, R1721
from typing import Tuple
......@@ -87,6 +88,12 @@ class IngestionManifest(ManifestComponentIF):
self.output_group = output_group
self.telescope = telescope
# Check if NGAS ingestion should be disabled for all manifests in this environment
try:
self.ngas_ingest = not CapoConfig().getboolean("archive-ingestion.skipNGAS")
except (KeyError, ValueError):
self.ngas_ingest = True
self.parameters = self.build_ingest_parameters(additional_metadata)
self.files_found = [file for file in self.staging_source_dir.iterdir()]
......@@ -108,7 +115,7 @@ class IngestionManifest(ManifestComponentIF):
params = ManifestParameters(
telescope=self.telescope,
reingest=False,
ngas_ingest=True,
ngas_ingest=self.ngas_ingest,
calibrate=False,
staging_source_dir=self.staging_source_dir,
additional_metadata=additional_metadata,
......@@ -118,7 +125,7 @@ class IngestionManifest(ManifestComponentIF):
params = ManifestParameters(
telescope=self.telescope,
reingest=False,
ngas_ingest=True,
ngas_ingest=self.ngas_ingest,
calibrate=False,
staging_source_dir=self.staging_source_dir,
)
......@@ -127,7 +134,7 @@ class IngestionManifest(ManifestComponentIF):
params = ManifestParameters(
telescope=self.telescope,
reingest=False,
ngas_ingest=True,
ngas_ingest=self.ngas_ingest,
staging_source_dir=self.staging_source_dir,
)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment