Skip to content

Commit

Permalink
fix: add debug logs
Browse files Browse the repository at this point in the history
  • Loading branch information
raphael0202 committed Jan 8, 2024
1 parent fcf0f21 commit 05bc61d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/_import.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,12 @@ def get_processed_since(
timestamp = int(timestamp_id.split("-")[0])
# Avoid fetching the same ID repeatedly
if id_ in fetched_ids:
logger.debug(f"Skipping ID {id_} because it was already fetched")
continue
fetched_ids.add(id_)
document = document_fetcher.fetch_document(stream_name, item)
if document is None:
logger.debug(f"Skipping ID {id_} because it was not found")
continue
yield timestamp, document

Expand Down Expand Up @@ -137,6 +139,7 @@ def get_new_updates(
timestamp = int(timestamp_id.split("-")[0])
document = document_fetcher.fetch_document(stream_name, item)
if document is None:
logger.debug(f"Skipping ID {id_} because it was not found")
continue
yield timestamp, document

Expand Down

0 comments on commit 05bc61d

Please sign in to comment.