From 48cf7080696992d970f7ae650241da85227c0fa6 Mon Sep 17 00:00:00 2001 From: Anderson T Date: Wed, 27 Nov 2024 22:01:17 -0800 Subject: [PATCH] add logging when we remove old entry --- sdk/fetch_events.py | 1 + sdk/fetch_execs.py | 1 + 2 files changed, 2 insertions(+) diff --git a/sdk/fetch_events.py b/sdk/fetch_events.py index 4a06b2e..bef526d 100644 --- a/sdk/fetch_events.py +++ b/sdk/fetch_events.py @@ -88,6 +88,7 @@ def updateDataFromNotion(writeLocation="data/"): full_image_path = f"data/event_images/{event_id}.{ext}" if exists(full_image_path): os.remove(full_image_path) + logger.info(f"Removed image for event {event_id} at {full_image_path}.") # Log removal for page in event_pages["results"]: page_updated = False diff --git a/sdk/fetch_execs.py b/sdk/fetch_execs.py index 64b0928..8933e5d 100644 --- a/sdk/fetch_execs.py +++ b/sdk/fetch_execs.py @@ -105,6 +105,7 @@ def updateDataFromNotion(writeLocation="data/"): full_image_path = f"{writeLocation}/exec_images/{student_id}.{ext}" if exists(full_image_path): os.remove(full_image_path) + logger.info(f"Removed image for executive {student_id} at {full_image_path}.") # Log removal for page in exec_pages["results"]: