Skip to content
Snippets Groups Projects

WS-543: Addressed issues found in calibration ingestion testing

Merged Janet Goldstein requested to merge WS-543-fix-manifest-issues-2021-07-22 into main
Files
27
@@ -4,7 +4,6 @@ import sys
from ingest_envoy.launchers import IngestCalibrationLauncher
from ingest_envoy.solicitor import Solicitor
from messaging.router import Router
from pycapo import CapoConfig
"""
@@ -57,20 +56,6 @@ def check_ingest_type(args_type: str, parameters: dict) -> bool:
return False
def send_ingestion_complete_message(workflow_request_id: str):
"""
Send AMQP message to notify the system that ingestion has succeeded
:param workflow_request_id: ID of workflow request that has had its products ingested
"""
ingestion_complete_msg = {
"type": "ingestion-complete",
"workflow_request_id": workflow_request_id,
}
router = Router("workflow")
router.send_message(**ingestion_complete_msg)
def main():
args = arg_parser().parse_args()
@@ -82,7 +67,9 @@ def main():
ingest_result = IngestCalibrationLauncher(parameters).launch_ingestion()
if ingest_result == 0:
# Ingestion succeeded
send_ingestion_complete_message(parameters["workflowRequestId"])
logger.info("Ingestion finished successfully!")
else:
logger.error("ERROR: Ingestion failure! Please check logs")
else:
logger.error(
Loading