All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 55s
StubFederationService silently no-ops federation events when cart's event processor wins the race to pick them up. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
29 lines
1.1 KiB
Python
29 lines
1.1 KiB
Python
"""Cart app service registration."""
|
|
from __future__ import annotations
|
|
|
|
|
|
def register_domain_services() -> None:
|
|
"""Register services for the cart app.
|
|
|
|
Cart owns: Order, OrderItem.
|
|
Standard deployment registers all 4 services as real DB impls
|
|
(shared DB). For composable deployments, swap non-owned services
|
|
with stubs from shared.services.stubs.
|
|
"""
|
|
from shared.services.registry import services
|
|
from shared.services.blog_impl import SqlBlogService
|
|
from shared.services.calendar_impl import SqlCalendarService
|
|
from shared.services.market_impl import SqlMarketService
|
|
from shared.services.cart_impl import SqlCartService
|
|
|
|
services.cart = SqlCartService()
|
|
if not services.has("blog"):
|
|
services.blog = SqlBlogService()
|
|
if not services.has("calendar"):
|
|
services.calendar = SqlCalendarService()
|
|
if not services.has("market"):
|
|
services.market = SqlMarketService()
|
|
if not services.has("federation"):
|
|
from shared.services.federation_impl import SqlFederationService
|
|
services.federation = SqlFederationService()
|