Monitor tree building progress

Trying to find why only the one post comes out with no replies
This commit is contained in:
autocommit 2020-06-01 01:53:23 +00:00 committed by Cy
parent a7e3c10fd0
commit 09e5573b24
No known key found for this signature in database
GPG Key ID: F66D599380F88521
1 changed files with 4 additions and 1 deletions

View File

@ -7,11 +7,14 @@ def maketree(descendants):
for descendant in descendants:
if not descendant.in_reply_to_id:
roots.add(descendant.id)
if descendant.in_reply_to_id in replies:
print("ROOT", descendant.id, descendant.account.acct)
elif descendant.in_reply_to_id in replies:
reps = replies[descendant.in_reply_to_id]
reps.add(descendant.id)
print("REPLY", descendant.id, descendant.in_reply_to_id)
else:
reps = set()
print("NEWREPLY", descendant.id, descendant.in_reply_to_id)
replies[descendant.in_reply_to_id] = set([descendant.id])
seen = set()
def onelevel(reps):