Skip to content
Snippets Groups Projects

Fixing post-ingestion message error

Merged Daniel Nemergut requested to merge ingest_obs_aat_message into main
2 unresolved threads
3 files
+ 40
1
Compare changes
  • Side-by-side
  • Inline
Files
3
@@ -178,6 +178,26 @@ def send_aat_image_message(parameters: dict, ingest_type: Union[IngestType, VLAS
)
def send_aat_obs_message(parameters: dict):
"""
Send AMQP message to AAT to set off observation (VLBA) indexing
:param parameters: dictionary of available input parameters
:return:
"""
url = parameters["workflowUrl"] + f"/workflows/requests/message-archive/obs-ingestion-complete"
payload = {"project_code": parameters["project"]}
response = requests.post(url, json=payload)
if response.status_code != http.HTTPStatus.OK:
logger.warning(
f"WARNING: Failed to send observation ingestion complete to archive for observation associated with "
f"project {parameters['project']}."
f" Please set off the index manually!"
)
def _determine_ingestion_info(
args: argparse.Namespace,
) -> Tuple[Union[IngestType, VLASSIngestType], dict, IngestLauncherIF]:
@@ -228,6 +248,8 @@ def main():
logger.info("Ingestion finished successfully! Sending status message to archive...")
if arg_type == IngestType.CAL:
set_cal_status_flag(parameters)
elif arg_type == IngestType.OBS:
send_aat_obs_message(parameters)
else:
send_aat_image_message(parameters, arg_type)
else:
Loading