Skip to content

Commit 8cb174d

Browse files
committed
remove fetching from ignored posts
1 parent f5e3854 commit 8cb174d

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

backend/scraping/event_processor.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,10 @@ def _get_club_type(ig_handle):
4747
def _get_seen_shortcodes(self):
4848
"""Fetch existing shortcodes to avoid processing duplicates."""
4949
try:
50-
# Get shortcodes from successful events
50+
# Get shortcodes only from successful events
5151
events = Events.objects.filter(source_url__contains="/p/").values_list("source_url", flat=True)
5252
event_codes = {url.strip("/").split("/")[-1] for url in events}
53-
54-
# Get shortcodes from explicitly ignored posts
55-
ignored = IgnoredPost.objects.values_list("shortcode", flat=True)
56-
57-
return event_codes.union(ignored)
53+
return event_codes
5854
except Exception as e:
5955
logger.error(f"Error fetching seen shortcodes: {e}")
6056
return set()
@@ -157,7 +153,7 @@ async def process(self, posts_data, cutoff_date):
157153
all_s3_urls = post.get("all_s3_urls", [])
158154

159155
if not extracted_events:
160-
await self._ignore_post(shortcode)
156+
logger.info(f"No events found for {shortcode}, skipping")
161157
continue
162158

163159
if not isinstance(extracted_events, list):

0 commit comments

Comments
 (0)