osmose.feedback_limitsΒΆ
In-process rate limiter for feedback submission (public deployment, D5).
Deliberately in-memory: a single-worker Shiny deploy is the documented target, and a persistent limiter would be a second consistency problem for no benefit. If the app is ever run multi-worker, this becomes per-worker and the cap must be divided accordingly β stated here so the limitation is visible rather than discovered.
Thread safety: allow() is an unsynchronised read-modify-write. Concurrent calls can overshoot the cap, and a concurrent sweep can raise either KeyError (a key deleted twice) or RuntimeError: dictionary changed size during iteration (the table mutated while the sweep scans it). The target is a single-worker Shiny deploy whose event loop has no await inside allow() and cannot interleave.
Classes
|