From ff31c3627721ebdd3bfa1e17303947edcf1516bc Mon Sep 17 00:00:00 2001 From: Nick Ninov Date: Tue, 3 Mar 2026 09:31:11 +0000 Subject: [PATCH] download: fix infinite loop bug --- data_utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data_utils.py b/data_utils.py index 8891d84..42513c9 100644 --- a/data_utils.py +++ b/data_utils.py @@ -213,7 +213,7 @@ def save_messages( "channel_id": community_info["chat_id"].replace(community_info["community_id"], ""), "channel_category_id": community_info["category_id"], **{target_key: msg[msg_key] for msg_key, target_key in mappings.items() if msg_key in msg}, - "extracted_at": datetime.datetime.now().timestamp() + "extracted_at_timestamp": datetime.datetime.now().timestamp() } point["sent_timestamp"] /= 1_000 timestamp = datetime.datetime.fromtimestamp(point["sent_timestamp"]) @@ -230,7 +230,7 @@ def save_messages( if len(chat["cursor"]) > 0 and not finished: cursor: str = chat["cursor"] - finished = bool(cursor) + finished = not bool(cursor) if len(messages) >= batch_size: save_batch(messages, folder)