From 7f06f86af199cd1c0c41b668145c626881090665 Mon Sep 17 00:00:00 2001 From: Nathan Bockisch <nbockisc@nrao.edu> Date: Wed, 13 Sep 2023 09:07:02 -0600 Subject: [PATCH] Added check to report if NGAS ingestion failed --- ...8090cb7acc4_add_mark4_observation_ingestion_workflow.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/shared/workspaces/alembic/versions/08090cb7acc4_add_mark4_observation_ingestion_workflow.py b/shared/workspaces/alembic/versions/08090cb7acc4_add_mark4_observation_ingestion_workflow.py index 45bde4289..046b2a69b 100644 --- a/shared/workspaces/alembic/versions/08090cb7acc4_add_mark4_observation_ingestion_workflow.py +++ b/shared/workspaces/alembic/versions/08090cb7acc4_add_mark4_observation_ingestion_workflow.py @@ -63,7 +63,12 @@ for FILE in *; do FULLPATH=$(/bin/readlink -f $FILE) NGASCMD="${NGASHOST}ARCHIVE?filename=file://${FULLPATH}" - /bin/curl $NGASCMD + + INGESTOUT=$(/bin/curl $NGASCMD) + if echo $INGESTOUT | grep -i "error"; then + echo "Failed to ingest ${FILE}" + exit 1 + fi done""" def upgrade(): -- GitLab