Update only the project map for the stored run payload if present.
(run_id: str, project: dict[str, str])
| 34 | |
| 35 | |
| 36 | async def update_run_project(run_id: str, project: dict[str, str]) -> None: |
| 37 | """Update only the project map for the stored run payload if present.""" |
| 38 | base = await cache.get(_cache_key(run_id)) |
| 39 | if isinstance(base, dict): |
| 40 | updated = dict(base) |
| 41 | updated["project"] = dict(project) |
| 42 | await cache.set( |
| 43 | _cache_key(run_id), |
| 44 | updated, |
| 45 | {"ttl": _TTL_SECONDS, "tags": [f"run:{run_id}"]}, |
| 46 | ) |
| 47 | |
| 48 | |
| 49 | # Per-user active sandbox mappings (name -> sandbox_id) |
no test coverage detected