All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 55s
Replace direct Post, MarketPlace, Calendar model queries and HTTP API calls with typed service calls. Events registers all 4 services via domain_services_fn with has() guards. Key changes: - app.py: use domain_services_fn, Post/Calendar/MarketPlace queries → services.blog/calendar/market, HTTP cart API → services.cart - calendars/markets services: Post → services.blog - post_associations: Post → services.blog, direct queries → services - markets routes: remove unused MarketPlace import - glue imports → shared imports throughout Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
27 lines
1011 B
Python
27 lines
1011 B
Python
"""Events app service registration."""
|
|
from __future__ import annotations
|
|
|
|
|
|
def register_domain_services() -> None:
|
|
"""Register services for the events app.
|
|
|
|
Events owns: Calendar, CalendarEntry, CalendarSlot, TicketType,
|
|
Ticket, CalendarEntryPost.
|
|
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.calendar = SqlCalendarService()
|
|
if not services.has("blog"):
|
|
services.blog = SqlBlogService()
|
|
if not services.has("market"):
|
|
services.market = SqlMarketService()
|
|
if not services.has("cart"):
|
|
services.cart = SqlCartService()
|