убрал SHORTMAPS_LOCK
This commit is contained in:
10
get_data.py
10
get_data.py
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user