From 95f1a597e6d5c5ed9bebe32077600070857fb7bc Mon Sep 17 00:00:00 2001 From: Jules Date: Thu, 9 Apr 2026 02:03:58 +0200 Subject: [PATCH] Fix critique : camera.capturer() dans run_in_executor pour ne pas bloquer asyncio --- backend/main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/main.py b/backend/main.py index 2ec434c..2d360f7 100644 --- a/backend/main.py +++ b/backend/main.py @@ -181,7 +181,8 @@ async def api_capturer(): capture_en_cours = True try: - chemin = camera.capturer() + loop = asyncio.get_event_loop() + chemin = await loop.run_in_executor(None, camera.capturer) finally: capture_en_cours = False if chemin is None: