Error handling...
All checks were successful
dR export statistics build / Build (push) Successful in 33m43s
All checks were successful
dR export statistics build / Build (push) Successful in 33m43s
This commit is contained in:
parent
dc534a3eb3
commit
fff6f1eacd
@ -81,7 +81,14 @@ async def sync_comments():
|
|||||||
rants_synced = 0
|
rants_synced = 0
|
||||||
for rant in db["rants"].find(order_by="-id"):
|
for rant in db["rants"].find(order_by="-id"):
|
||||||
rants_synced += 1
|
rants_synced += 1
|
||||||
|
try:
|
||||||
comments = dr.get_rant(rant["id"]).get("comments", [])
|
comments = dr.get_rant(rant["id"]).get("comments", [])
|
||||||
|
except Exception as ex:
|
||||||
|
print(ex)
|
||||||
|
print("Sleeping for a second..")
|
||||||
|
await asyncio.sleep(1)
|
||||||
|
continue
|
||||||
|
|
||||||
for comment in comments:
|
for comment in comments:
|
||||||
comments_synced += 1
|
comments_synced += 1
|
||||||
comment["created"] = timestamp_to_string(comment["created_time"])
|
comment["created"] = timestamp_to_string(comment["created_time"])
|
||||||
|
Loading…
Reference in New Issue
Block a user