Renumber the 15 reference docs into pillar groups (recipe -> anatomy): - 01 Build Recipe (entry), 02 Composition Root - domains: 10 Layering Rules - contract: 20 Spec-First Routing, 21 CRUD Template, 22 Auth Integration - interfaces/infra: 30 Infra Adapters - UI: 40 UI: Auto-Rendered Admin & Custom Pages (new; @aetoskia packages, client template, x- catalog via react-openapi MCP module) - pipelines: 50 Pipeline Scaffold, 51 Worker & Progress, 52 Human-in-the-Loop - delivery/meta: 90 Drone Pipelines, 91 Versioning & Changelog, 92 Genericity Matrix, 93 Library Registry, 94 Repository Inventory MCP module names are unchanged (NN_ prefix stripped); all cross-references (wiki, templates, hooks, registry) updated; lib index rewritten pillar-first; build recipe bootstraps the client template. Bundle + HTML sites regenerated.
32 lines
966 B
Python
32 lines
966 B
Python
"""# Summary
|
|
|
|
Item-sync pipeline — the demo pipeline axis of the blueprint.
|
|
|
|
Runs on the worker, consumes a pending job, and materializes its payload as an
|
|
item. Steps are plain async functions here; once the chain branches or needs
|
|
deterministic replay, wrap the steps in a dagpipe DAG (see standards
|
|
"50_pipeline_scaffold").
|
|
"""
|
|
import logging
|
|
|
|
logger = logging.getLogger(__name__)
|
|
|
|
|
|
async def run_item_sync(job, resources: dict) -> None:
|
|
"""Materialize a pending job payload as an item.
|
|
|
|
Step 1: extract the payload from the job.
|
|
Step 2: create the item through the item service.
|
|
|
|
Args:
|
|
job: The pending job document.
|
|
resources (dict): Wired services and adaptors.
|
|
"""
|
|
payload = job.payload or {}
|
|
item_svc = resources["item_svc"]
|
|
|
|
await item_svc.create({
|
|
"name": payload.get("name", job.name),
|
|
"quantity": payload.get("quantity", 1),
|
|
})
|
|
logger.info("Created item from job %s", str(job.id)) |