mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-13 08:52:02 +00:00
fix(router): drop the unused _corrected_cooldowns helper left behind by the main merge
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
parent
1903c562a0
commit
cfbadc5446
1 changed files with 0 additions and 9 deletions
|
|
@ -3491,15 +3491,6 @@ class RustCore(
|
|||
read: Final[object] = self._cache.batch_get_cache(keys=keys) # pyright: ignore[reportUnknownMemberType, reportUnknownVariableType] # DualCache's reads are untyped
|
||||
return read if isinstance(read, list) else [None] * len(keys) # pyright: ignore[reportUnknownVariableType] # see above
|
||||
|
||||
def _corrected_cooldowns(self, keys: Sequence[str], results: object) -> Sequence[object]:
|
||||
"""The cooldowns a batch read found, once ``active_cooldowns_from_results`` corrected the in-memory
|
||||
TTL of each it promoted from Redis and dropped each that expired."""
|
||||
if not isinstance(results, list):
|
||||
return [None] * len(keys)
|
||||
ids: Final = [key.removeprefix("deployment:").removesuffix(":cooldown") for key in keys]
|
||||
_ = self._cooldowns.active_cooldowns_from_results(ids, results) # pyright: ignore[reportUnknownArgumentType] # see above
|
||||
return results # pyright: ignore[reportUnknownVariableType] # see above
|
||||
|
||||
async def _increment_usage(self, keys: Sequence[object], amounts: Sequence[object]) -> None:
|
||||
try:
|
||||
counted: Final = await self._stores.increment_usage(keys, amounts)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue