MCPcopy Create free account
hub / github.com/CommonstackAI/UncommonRoute / _gc

Method _gc

uncommon_route/proxy.py:212–220  ·  view source on GitHub ↗
(self, now: float)

Source from the content-addressed store, hash-verified

210 self._pending: dict[str, tuple[float, float]] = {}
211
212 def _gc(self, now: float) -> float:
213 live: dict[str, tuple[float, float]] = {}
214 total = 0.0
215 for rid, (amount, ts) in self._pending.items():
216 if now - ts <= self._MAX_AGE_S:
217 live[rid] = (amount, ts)
218 total += amount
219 self._pending = live
220 return total
221
222 async def reserve(self, reservation_id: str, estimated_cost: float):
223 async with self._lock:

Callers 2

reserveMethod · 0.95
update_reserveMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected