From 52697e5437d8ef3d60dd74b3ec6d6ef6dd908241 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 24 Apr 2022 17:41:01 +0100 Subject: [PATCH] Longer period between hashtag swarm update --- inbox.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/inbox.py b/inbox.py index daaec9115..21025d673 100644 --- a/inbox.py +++ b/inbox.py @@ -179,10 +179,11 @@ def _update_cached_hashtag_swarm(base_dir: str, nickname: str, domain: str, curr_date = datetime.datetime.utcnow() time_diff = curr_date - modified_date diff_mins = int(time_diff.total_seconds() / 60) - if diff_mins < 10: + if diff_mins < 30: # was saved recently, so don't save again # This avoids too much disk I/O save_swarm = False + print('Not updating hashtag swarm') else: print('Updating cached hashtag swarm, last changed ' + str(diff_mins) + ' minutes ago')