""" This file contains queries that are used to write to track_fingerprint.fp_sweeper_log """ """ INSERT_FP_SWEEPER_LOG inserts a single record into track_fingerprint.fp_sweeper_log datetime_start (datetime NOT NULL): UTC datetime that the sweeper process started datetime_end (datetime NOT NULL): UTC datetime that the sweeper process ended daterange_start (datetime NOT NULL): UTC datetime of the starting time range of tuids in art_relation.track.last_updated daterange_end (datetime NOT NULL): UTC datetime of the ending time range of tuids in art_relation.track.last_updated num_tracks_added (bigint(20) NOT NULL): number of tracks that were added to the fp_capture_backfill queue num_tracks_checked (bigint(20) NOT NULL): number of tracks that were checked for missing fingerprints """ INSERT_FP_SWEEPER_LOG = """ INSERT INTO fp_sweeper_log (datetime_start, datetime_end, daterange_start, daterange_end, num_tracks_checked, num_tracks_queued, status, created_by) VALUES (:datetime_start, :datetime_end, :daterange_start, :daterange_end, :num_tracks_checked, :num_tracks_queued, :status, :created_by) """ """ QUERY_FP_SWEEPER_LOG_RECENT_ROWS retrieves the most recent 5 rows from fp_sweeper_log table. It is used by monitor_backfill.py. """ QUERY_FP_SWEEPER_LOG_RECENT_ROWS = """ SELECT datetime_start, datetime_end, daterange_start, daterange_end, num_tracks_checked, num_tracks_queued, status, created_by FROM fp_sweeper_log ORDER BY id DESC LIMIT 5; """