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

@@ -1600,7 +1600,6 @@ def list_opportunities(
def get_opportunity(opportunity_id: str) -> Optional[Dict[str, Any]]:
ensure_opportunity_schema()
sql = text("""
SELECT
o.*,
@@ -1664,7 +1663,6 @@ def get_opportunity(opportunity_id: str) -> Optional[Dict[str, Any]]:
def list_opportunity_tasks(opportunity_id: str, *, limit: int = 100) -> List[Dict[str, Any]]:
ensure_opportunity_schema()
sql = text("""
SELECT
id::text,
@@ -1693,7 +1691,6 @@ def list_opportunity_tasks(opportunity_id: str, *, limit: int = 100) -> List[Dic
def list_opportunity_events(opportunity_id: str, *, limit: int = 100) -> List[Dict[str, Any]]:
ensure_opportunity_schema()
sql = text("""
SELECT
id::text,