Skip to content
Snippets Groups Projects
Commit b036a9f8 authored by Daniel Nemergut's avatar Daniel Nemergut Committed by Charlotte Hausman
Browse files

Using the sbin location in capo to run the collectors and ingest scripts for...

Using the sbin location in capo to run the collectors and ingest scripts for the image, cal, seci, and curator workflows
parent 20049fdb
No related branches found
No related tags found
3 merge requests!1571catch 2.8.2.3 up with main,!15592.8.2.2-DEVELOPMENT into main,!1551Cherry pick partial curation for patch
...@@ -67,6 +67,7 @@ class ImageCollector(CollectorIF): ...@@ -67,6 +67,7 @@ class ImageCollector(CollectorIF):
self.logger.info("Collecting image products for staging...") self.logger.info("Collecting image products for staging...")
workflow_dir = self.parameters["workflowDir"] workflow_dir = self.parameters["workflowDir"]
staging_dir = self.parameters["staging_area"] staging_dir = self.parameters["staging_area"]
sbin_dir = self.parameters["script_location"]
tar_name = self.create_artifacts_name() tar_name = self.create_artifacts_name()
# rename image files to allow for duplicate ingestion # rename image files to allow for duplicate ingestion
...@@ -74,7 +75,7 @@ class ImageCollector(CollectorIF): ...@@ -74,7 +75,7 @@ class ImageCollector(CollectorIF):
# run script # run script
collector = subprocess.run( collector = subprocess.run(
["./image-product-collector.sh", workflow_dir, staging_dir, tar_name], [f"{sbin_dir}/image-product-collector.sh", workflow_dir, staging_dir, tar_name],
stdout=sys.stdout, stdout=sys.stdout,
stderr=sys.stderr, stderr=sys.stderr,
) )
...@@ -147,10 +148,11 @@ class SECICollector(CollectorIF): ...@@ -147,10 +148,11 @@ class SECICollector(CollectorIF):
cache_path = self.parameters["sourcePath"] cache_path = self.parameters["sourcePath"]
workflow_dir = self.parameters["workflowDir"] workflow_dir = self.parameters["workflowDir"]
staging_dir = self.parameters["staging_area"] staging_dir = self.parameters["staging_area"]
sbin_dir = self.parameters["script_location"]
tar_name = self.create_artifacts_name() tar_name = self.create_artifacts_name()
collector = subprocess.run( collector = subprocess.run(
["./seci-product-collector.sh", cache_path, workflow_dir, staging_dir, tar_name], [f"{sbin_dir}/seci-product-collector.sh", cache_path, workflow_dir, staging_dir, tar_name],
stdout=sys.stdout, stdout=sys.stdout,
stderr=sys.stderr, stderr=sys.stderr,
) )
......
...@@ -43,7 +43,6 @@ def trigger_ingest(real_ingest: bool, staging_dir: str, bin_dir: str = ".") -> i ...@@ -43,7 +43,6 @@ def trigger_ingest(real_ingest: bool, staging_dir: str, bin_dir: str = ".") -> i
:return: return code :return: return code
""" """
if real_ingest: if real_ingest:
# TODO: This should be cleaned up when cal and image ingests don't transfer files into condor and use sbin
ingest_process = subprocess.run( ingest_process = subprocess.run(
[f"{bin_dir}/ingest", "--json", "-p", staging_dir], [f"{bin_dir}/ingest", "--json", "-p", staging_dir],
stdout=sys.stdout, stdout=sys.stdout,
...@@ -96,7 +95,7 @@ class IngestCalibrationLauncher(LauncherIF): ...@@ -96,7 +95,7 @@ class IngestCalibrationLauncher(LauncherIF):
self.prepare_for_launch() self.prepare_for_launch()
self.logger.info("Running ingest!") self.logger.info("Running ingest!")
return trigger_ingest(self.parameters["useIngest"], self.staging_source_dir) return trigger_ingest(self.parameters["useIngest"], self.staging_source_dir, self.parameters["script_location"])
def prepare_for_launch(self): def prepare_for_launch(self):
""" """
...@@ -122,12 +121,14 @@ class IngestCalibrationLauncher(LauncherIF): ...@@ -122,12 +121,14 @@ class IngestCalibrationLauncher(LauncherIF):
""" """
self.logger.info("Collecting calibration tables for staging...") self.logger.info("Collecting calibration tables for staging...")
workflow_dir = self.parameters["workflowDir"] workflow_dir = self.parameters["workflowDir"]
sbin_dir = self.parameters["script_location"]
sdm_id = self.parameters["sdmId"] sdm_id = self.parameters["sdmId"]
cal_processing_datetime = self.parameters["processingStart"] cal_processing_datetime = self.parameters["processingStart"]
# run script # run script
if self.parameters["multiVersion"] is False: if self.parameters["multiVersion"] is False:
collector = subprocess.run( collector = subprocess.run(
["./calibration-table-collector.sh", workflow_dir, sdm_id, cal_processing_datetime], [f"{sbin_dir}/calibration-table-collector.sh", workflow_dir, sdm_id, cal_processing_datetime],
stdout=sys.stdout, stdout=sys.stdout,
stderr=sys.stderr, stderr=sys.stderr,
) )
...@@ -136,7 +137,7 @@ class IngestCalibrationLauncher(LauncherIF): ...@@ -136,7 +137,7 @@ class IngestCalibrationLauncher(LauncherIF):
collector = subprocess.run( collector = subprocess.run(
[ [
"./calibration-table-collector.sh", f"{sbin_dir}/calibration-table-collector.sh",
workflow_dir, workflow_dir,
sdm_id, sdm_id,
cal_processing_datetime, cal_processing_datetime,
...@@ -185,7 +186,7 @@ class IngestImageLauncher(LauncherIF): ...@@ -185,7 +186,7 @@ class IngestImageLauncher(LauncherIF):
self.prepare_for_launch() self.prepare_for_launch()
self.logger.info("Running ingest!") self.logger.info("Running ingest!")
return trigger_ingest(self.parameters["useIngest"], self.staging_source_dir) return trigger_ingest(self.parameters["useIngest"], self.staging_source_dir, self.parameters["script_location"])
def prepare_for_launch(self): def prepare_for_launch(self):
""" """
...@@ -344,4 +345,4 @@ class CuratorLauncher(LauncherIF): ...@@ -344,4 +345,4 @@ class CuratorLauncher(LauncherIF):
self.prepare_for_launch() self.prepare_for_launch()
self.logger.info("Running curator!") self.logger.info("Running curator!")
return trigger_curator(self.parameters["useIngest"]) return trigger_curator(self.parameters["useIngest"], self.parameters["script_location"])
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