Expire cached announces

main
Bob Mottram 2022-11-22 10:57:56 +00:00
parent 6a83bf0246
commit e29b5cf8ca
1 changed files with 3 additions and 3 deletions

View File

@ -4285,6 +4285,7 @@ def _expire_announce_cache_for_person(base_dir: str,
cache_dir = \
acct_dir(base_dir, nickname, domain) + '/cache/announce/' + nickname
if not os.path.isdir(cache_dir):
print('No cached announces for ' + nickname + '@' + domain)
return 0
expired_post_count = 0
posts_in_cache = os.scandir(cache_dir)
@ -4350,7 +4351,6 @@ def archive_posts(base_dir: str, http_prefix: str, archive_dir: str,
_expire_announce_cache_for_person(base_dir,
nickname, domain,
max_cache_age_days, True)
if expired_announces > 0:
print('Expired ' + str(expired_announces) +
' cached announces')
if archive_dir: