mirror of
				https://git.sr.ht/~tsileo/microblog.pub
				synced 2025-06-05 21:59:23 +02:00 
			
		
		
		
	Fix incoming activity processing
This commit is contained in:
		| @@ -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: | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user