fix(api): replace threading.Lock with asyncio.Lock for hydration guard
await inside a threading.Lock yields to the event loop while the OS thread still holds the lock — potential deadlock under FastAPI thread pool dispatch. asyncio.Lock is the correct primitive for async critical sections. Also fixed stale diurnal.py docstring that had the delegation direction backwards.
This commit is contained in:
@@ -38,7 +38,7 @@ def _parse_window(window: str) -> tuple[int, int, int, int] | None:
|
||||
|
||||
Returns ``None`` for malformed input — callers treat that as
|
||||
"always-on" so a single config typo never silences the whole fleet
|
||||
(mirrors :func:`decnet.realism.personas.in_active_hours` semantics).
|
||||
(:func:`decnet.realism.personas.in_active_hours` delegates here).
|
||||
"""
|
||||
try:
|
||||
start_s, end_s = window.split("-")
|
||||
|
||||
Reference in New Issue
Block a user