убрал SHORTMAPS_LOCK

This commit is contained in:
2025-11-26 14:09:21 +03:00
parent 9efb351522
commit a317dd9d6a

View File

@@ -3635,12 +3635,12 @@ async def get_shotmap_image(player_id_shots: str):
Отдаёт картинку карты бросков из оперативной памяти.
player_id_shots должен совпадать с ключом в SHOTMAP_CACHE, например "23_shots".
"""
async with SHOTMAPS_LOCK:
data = SHOTMAP_CACHE.get(player_id_shots)
if not data:
raise HTTPException(status_code=404, detail="Shotmap not found in memory")
# async with SHOTMAPS_LOCK:
data = SHOTMAP_CACHE.get(player_id_shots)
if not data:
raise HTTPException(status_code=404, detail="Shotmap not found in memory")
return Response(content=data, media_type="image/png")
return Response(content=data, media_type="image/png")
@app.get("/last_5_games")