mirror of
https://git.sr.ht/~tsileo/microblog.pub
synced 2024-12-22 05:04:27 +00:00
Fix incoming activity processing
This commit is contained in:
parent
f2e28e89f8
commit
66a9778995
2 changed files with 3 additions and 1 deletions
|
@ -145,7 +145,8 @@ async def save_actor(db_session: AsyncSession, ap_actor: ap.RawObject) -> "Actor
|
|||
handle=_handle(ap_actor),
|
||||
)
|
||||
db_session.add(actor)
|
||||
await db_session.commit()
|
||||
await db_session.flush()
|
||||
await db_session.refresh(actor)
|
||||
return actor
|
||||
|
||||
|
||||
|
|
|
@ -108,6 +108,7 @@ async def process_next_incoming_activity(db_session: AsyncSession) -> bool:
|
|||
)
|
||||
except Exception:
|
||||
logger.exception("Failed")
|
||||
await db_session.rollback()
|
||||
next_activity.error = traceback.format_exc()
|
||||
_set_next_try(next_activity)
|
||||
else:
|
||||
|
|
Loading…
Reference in a new issue