perf: optimize reconciliation candidate lookup

This commit is contained in:
plx
2026-08-14 12:56:03 +00:00
parent 89017f71a6
commit 07dc9db198
8 changed files with 373 additions and 31 deletions

View File

@@ -248,7 +248,6 @@ def list_products(
active: Optional[str] = "true",
limit: int = 300,
) -> List[Dict[str, Any]]:
ensure_product_schema()
filters = []
params: Dict[str, Any] = {"limit": int(limit)}
if q:
@@ -394,7 +393,6 @@ def set_product_active(product_id: str, active: bool) -> bool:
def list_opportunity_items(opportunity_id: str) -> List[Dict[str, Any]]:
ensure_product_schema()
sql = text("""
SELECT
oi.id::text,