The AAT/PPI uses a set of processes to handle keeping the system up-to-date with ALMA observations and calibrations. The software processes are part of the amygdala package, and run largely without developer interaction.
This system was the initial example of this pattern in the AAT/PPI, and has since been re-used for ingestion of VLBA data and extended to also work with ALMA calibrations. Using a tracking table within the metadata database (alma_reingestion_queue) and a dedicated rabbitmq queue, there are a pair of programs in amgydala which do the following:
The VLBA version of the system limits what will be run concurrently (to avoid self-interference in creating the basic project information), but it follows the same general idea. For VLBA the system uses a separate tracking table and a modified QueueRunner, but follow the same basic philosophy.
Newer observations are found via queries to the AQUA_V_EXECBLOCK view, comparing the ENDTIME value to what the latest observation in the tracking table.
When a new ASDM comes up for reingestion, a workflow is launched in CV where the ASDM XML files are extracted from NGAS at the NAASC and parsed via the ingest script to populate AAT/PPI execution_blocks & associated tables.
Newer calibrations are found via queries to the ASA_PRODUCT_FILES table, comparing the CREATION_DATE to the latest calibration listed in the tracking table. Once a new or updated MOUS is identified, we perform the following checks:
Note: Because the ATT/PPI did not initially track any of the ALMA structure information, early on after the release of version 3.6 it is possible for a calibration to be evaluated before a constituent ASDMs of the MOUS is reingested to populate the structure. In that case, the processing of the calibration information is deferred until the MOUS is recognized in the alma_ouses table.
When a MOUS comes up for reingestion, a workflow is launched in NM which performs queries to populate calibrations & associated tables. The ASDMs for the calibrated MOUS are then marked 'Calibrated' to indicate that a restore may be performed.