From 120008ced019d2c1333c91f7b70c2555127685f3 Mon Sep 17 00:00:00 2001 From: nanos Date: Tue, 25 Jun 2024 08:50:27 +0100 Subject: [PATCH] shorten storage time --- find_posts.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/find_posts.py b/find_posts.py index 639b64b..975baac 100644 --- a/find_posts.py +++ b/find_posts.py @@ -1394,7 +1394,8 @@ if __name__ == "__main__": recently_checked_context[tootUrl]['created_at'] = parser.parse(recently_checked_context[tootUrl]['created_at']) lastSeen = recently_checked_context[tootUrl]['lastSeen'] userAge = datetime.now(lastSeen.tzinfo) - lastSeen - if(userAge.total_seconds() > 30 * 60 * 60 * 60): + # dont really need to keep track for more than 7 days: if we haven't seen it in 7 days we can refetch content anyway + if(userAge.total_seconds() > 7 * 24 * 60 * 60): recently_checked_users.pop(tootUrl) parsed_urls = {}