Monitor tree building progress

Trying to find why only the one post comes out with no replies
This commit is contained in:
Cy 2020-06-01 01:53:23 +00:00 committed by Cy
parent 631c1409af
commit 7552f4e627
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):