From 77b4cd3c45d3275b5a6d2eb24bd113ebdddcbdac Mon Sep 17 00:00:00 2001 From: Alex Bair Date: Mon, 24 Feb 2025 08:57:42 -0500 Subject: [PATCH] source-intercom-native: remove unneeded counts from `conversations` and `tickets` After the change in commit 7702e444366d42fd45898e84bd354737f7ea35f5 to checkpoint after every page, the counts in `conversations` and `tickets` no longer served any purpose. I missed removing them in that earlier commit, so they're being removed now. --- source-intercom-native/source_intercom_native/api.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/source-intercom-native/source_intercom_native/api.py b/source-intercom-native/source_intercom_native/api.py index c31a094d1..925ba308a 100644 --- a/source-intercom-native/source_intercom_native/api.py +++ b/source-intercom-native/source_intercom_native/api.py @@ -263,8 +263,6 @@ async def fetch_tickets( url = f"{API}/tickets/search" body = _generate_conversations_or_tickets_search_body(start, end) - count = 0 - while True: response = TicketsSearchResponse.model_validate_json( await http.request(log, url, "POST", json=body) @@ -294,7 +292,6 @@ async def fetch_tickets( if ticket.updated_at > start: yield ticket - count += 1 if response.pages.next is None: yield _s_to_dt(last_seen_ts) @@ -318,8 +315,6 @@ async def fetch_conversations( url = f"{API}/conversations/search" body = _generate_conversations_or_tickets_search_body(start, end) - count = 0 - while True: response = ConversationsSearchResponse.model_validate_json( await http.request(log, url, "POST", json=body) @@ -349,7 +344,6 @@ async def fetch_conversations( if conversation.updated_at > start: yield conversation - count += 1 if response.pages.next is None: yield _s_to_dt(last_seen_ts)