Skip to content

Commit

Permalink
Log missing sites
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronfriedman6 committed Dec 23, 2024
1 parent 576e487 commit 16c9162
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/pipeline_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down

0 comments on commit 16c9162

Please sign in to comment.