Update shared submodule + emit product events for federation
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 52s

- Emit product.listed events when products are created
- Updated shared with federation handlers, delivery, anchoring

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
giles
2026-02-21 16:00:04 +00:00
parent 3bddee0d94
commit a80547c7fa
2 changed files with 15 additions and 1 deletions

View File

@@ -291,6 +291,20 @@ async def _create_product_from_payload(session: AsyncSession, payload: Dict[str,
#await session.flush() # get p.id
_replace_children(p, payload)
await session.flush()
# Emit federation event for new products
from shared.events import emit_event
await emit_event(
session,
event_type="product.listed",
aggregate_type="Product",
aggregate_id=p.id,
payload={
"title": p.title or "",
"description": getattr(p, "description", "") or "",
},
)
return p
# ---- API --------------------------------------------------------------------

2
shared

Submodule shared updated: 8850a0106a...dd7a99e8b7