From 16c91624192fbd50f605869e8f95e29163e6bcb4 Mon Sep 17 00:00:00 2001 From: aaronfriedman Date: Mon, 23 Dec 2024 12:30:42 -0700 Subject: [PATCH] Log missing sites --- lib/pipeline_controller.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/pipeline_controller.py b/lib/pipeline_controller.py index d368053..442dd2a 100644 --- a/lib/pipeline_controller.py +++ b/lib/pipeline_controller.py @@ -203,11 +203,13 @@ def process_broken_orbits(self, start_date, end_date): ) closed_site_dates = self.redshift_client.execute_query(closures_query) closed_site_dates = set([tuple(row) for row in closed_site_dates]) - recoverable_site_dates += [ + missing_site_dates = [ (site, visits_date) for (site, visits_date) in missing_site_dates if (site[:2], visits_date) not in closed_site_dates ] + recoverable_site_dates += missing_site_dates + self.logger.info(f"Found the following missing sites: {missing_site_dates}") recoverable_site_dates = sorted( recoverable_site_dates, key=lambda x: (x[1], x[0])