mirror of https://gitlab.com/bashrc2/epicyon
debug
parent
a33c94fe8c
commit
0869b6ece8
12
posts.py
12
posts.py
|
|
@ -5419,16 +5419,16 @@ def _expire_posts_for_person(http_prefix: str, nickname: str, domain: str,
|
||||||
continue
|
continue
|
||||||
if is_dm(post_json_object):
|
if is_dm(post_json_object):
|
||||||
continue
|
continue
|
||||||
print('DEBUG: published_str ' + published_str + ' ' +
|
if debug:
|
||||||
str(max_age_days))
|
print('DEBUG: deleting expired post ' + published_str + ' ' +
|
||||||
debug = True
|
str(max_age_days))
|
||||||
if delete_post(base_dir, http_prefix, nickname, domain,
|
if delete_post(base_dir, http_prefix, nickname, domain,
|
||||||
full_filename, debug, recent_posts_cache, True):
|
full_filename, debug, recent_posts_cache, True):
|
||||||
expired_post_count += 1
|
expired_post_count += 1
|
||||||
debug = False
|
|
||||||
else:
|
else:
|
||||||
print('DEBUG: retained published_str ' + published_str + ' ' +
|
if debug:
|
||||||
str(max_age_days))
|
print('DEBUG: retained published_str ' + published_str + ' ' +
|
||||||
|
str(max_age_days))
|
||||||
|
|
||||||
return expired_post_count
|
return expired_post_count
|
||||||
|
|
||||||
|
|
|
||||||
6
utils.py
6
utils.py
|
|
@ -2229,7 +2229,8 @@ def delete_post(base_dir: str, http_prefix: str,
|
||||||
# i.e. DMs should only be removed if they are manually deleted
|
# i.e. DMs should only be removed if they are manually deleted
|
||||||
if not manual:
|
if not manual:
|
||||||
if _is_remote_dm(domain, post_json_object):
|
if _is_remote_dm(domain, post_json_object):
|
||||||
print('DEBUG: remote DM not deleted ' + post_filename)
|
if debug:
|
||||||
|
print('DEBUG: remote DM not deleted ' + post_filename)
|
||||||
return False
|
return False
|
||||||
|
|
||||||
# don't allow deletion of bookmarked posts
|
# don't allow deletion of bookmarked posts
|
||||||
|
|
@ -2241,7 +2242,8 @@ def delete_post(base_dir: str, http_prefix: str,
|
||||||
# don't remove replies to blog posts
|
# don't remove replies to blog posts
|
||||||
if _is_reply_to_blog_post(base_dir, nickname, domain,
|
if _is_reply_to_blog_post(base_dir, nickname, domain,
|
||||||
post_json_object):
|
post_json_object):
|
||||||
print('DEBUG: reply to blog post not deleted ' + post_filename)
|
if debug:
|
||||||
|
print('DEBUG: reply to blog post not deleted ' + post_filename)
|
||||||
return False
|
return False
|
||||||
|
|
||||||
# remove from recent posts cache in memory
|
# remove from recent posts cache in memory
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue