Tweak/fix incoming activity processing
This commit is contained in:
parent
4a975dcbfa
commit
3f4a266157
3 changed files with 16 additions and 15 deletions
|
@ -98,18 +98,16 @@ async def process_next_incoming_activity(db_session: AsyncSession) -> bool:
|
|||
|
||||
next_activity.tries = next_activity.tries + 1
|
||||
next_activity.last_try = now()
|
||||
await db_session.commit()
|
||||
|
||||
try:
|
||||
# async with db_session.begin_nested():
|
||||
await save_to_inbox(
|
||||
db_session,
|
||||
next_activity.ap_object,
|
||||
next_activity.sent_by_ap_actor_id,
|
||||
)
|
||||
async with db_session.begin_nested():
|
||||
await save_to_inbox(
|
||||
db_session,
|
||||
next_activity.ap_object,
|
||||
next_activity.sent_by_ap_actor_id,
|
||||
)
|
||||
except Exception:
|
||||
logger.exception("Failed")
|
||||
await db_session.rollback()
|
||||
next_activity.error = traceback.format_exc()
|
||||
_set_next_try(next_activity)
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue