MWATelescope / mwax_mover

MWA Correlator (mwax) mover. Gluing components together.
3 stars 0 forks source link

Handle in mwax_archiver, failure to insert data_file row #12

Closed gsleap closed 1 month ago

gsleap commented 2 years ago

Log the error then move the file to dont_archive.

In this scenario it means M&C deleted the observation BUT the metafits was already generated so mwax_u2s et al. thought it was still a real observation.

gsleap commented 2 months ago

Example in log here:

2024-07-04 07:26:30,150, ERROR, work_checksum_and_db, execute_single_dml_row(): unknown Error- insert or update on table "data_files_1400" violates foreign key constraint "data_files_fk"
DETAIL:  Key is not present in table "mwa_setting".

2024-07-04 07:26:30,151, ERROR, work_checksum_and_db, 1404046424_20240703125326_ch059_000.fits insert_data_file_row() error inserting data_files record in data_files table: RetryError[<Future at 0x7fa9284ffad0 state=finished raised ForeignKeyViolation>]. SQL was INSERT INTO data_files
                (observation_num,
                filetype,
                size,
                filename,
                host,
                remote_archived,
                deleted,
                checksum_type,
                checksum,
                trigger_id)
                VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s)