Fix incoming activity processing
parent
f2e28e89f8
commit
66a9778995
|
@ -145,7 +145,8 @@ async def save_actor(db_session: AsyncSession, ap_actor: ap.RawObject) -> "Actor
|
||||||
handle=_handle(ap_actor),
|
handle=_handle(ap_actor),
|
||||||
)
|
)
|
||||||
db_session.add(actor)
|
db_session.add(actor)
|
||||||
await db_session.commit()
|
await db_session.flush()
|
||||||
|
await db_session.refresh(actor)
|
||||||
return actor
|
return actor
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -108,6 +108,7 @@ async def process_next_incoming_activity(db_session: AsyncSession) -> bool:
|
||||||
)
|
)
|
||||||
except Exception:
|
except Exception:
|
||||||
logger.exception("Failed")
|
logger.exception("Failed")
|
||||||
|
await db_session.rollback()
|
||||||
next_activity.error = traceback.format_exc()
|
next_activity.error = traceback.format_exc()
|
||||||
_set_next_try(next_activity)
|
_set_next_try(next_activity)
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue