je_load_density.utils.throttle

class je_load_density.utils.throttle.RpsThrottle(rps: float, burst: int | None = None)

Bases: object

Token-bucket throttle. acquire blocks until one token is available, then consumes it.

acquire() None
je_load_density.utils.throttle.get_throttle(key: str, rps: float, burst: int | None = None) RpsThrottle

Return the shared throttle for key; create it on first call. Subsequent calls ignore later rps / burst arguments — clear with reset_throttles() to reconfigure.

je_load_density.utils.throttle.reset_throttles() None

Modules

rps_throttle

Per-key RPS throttle.