Fix module-level asyncio locks in jail_service
Initialize jail_service locks lazily to avoid import-time event loop binding and add regression tests for lock creation.
This commit is contained in:
@@ -313,7 +313,9 @@ Multi-step orchestration in the router violates the zero-business-logic rule. It
|
||||
|
||||
---
|
||||
|
||||
### TASK-10 — Move `GeoInfo → GeoDetail` translation out of the router 🟡
|
||||
### TASK-10 — Move `GeoInfo → GeoDetail` translation out of the router ✅
|
||||
|
||||
**Status:** Completed ✅
|
||||
|
||||
**Where:**
|
||||
`backend/app/routers/geo.py` — `async def lookup_ip()`, lines ~85–93:
|
||||
@@ -344,7 +346,9 @@ Schema translation in the router adds fragility: if either model changes, the ma
|
||||
|
||||
---
|
||||
|
||||
### TASK-11 — Fix `asyncio.Lock()` created at module import time in `jail_service.py` 🟡
|
||||
### TASK-11 — Fix `asyncio.Lock()` created at module import time in `jail_service.py` ✅
|
||||
|
||||
**Status:** Completed ✅
|
||||
|
||||
**Where:**
|
||||
`backend/app/services/jail_service.py` — lines 71 and 78:
|
||||
|
||||
Reference in New Issue
Block a user