GUI Login bug: seemed to be a problem when using the login call from GUI where it would timeout if taking too long. Did not resolve why but found using await run_in_threadpool and upping the timeout solved the symptom. Maybe changes to baton ahve ebcome very itnesive seerver side... should monitor.

This commit is contained in:
2026-03-27 17:05:04 +01:00
parent f8eda0a728
commit ad46460e0c
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -151,7 +151,7 @@ daq.set_face_detection_progress_callback(_push_face_detection_progress)
@app.post("/token")
async def login(form_data: OAuth2PasswordRequestForm = Depends()):
data = auth.authenticate_user(cfg, form_data)
data = await run_in_threadpool(auth.authenticate_user, cfg, form_data)
return {"access_token": data, "token_type": "bearer"}
@app.get("/meta/error-codes")
+1 -1
View File
@@ -28,7 +28,7 @@ def auth(base_url: str | None) -> str:
headers={
"Content-Type": "application/x-www-form-urlencoded"
},
timeout=(2.0, 5.0), # (connect timeout, read timeout)
timeout=(3.0, 15.0), # (connect timeout, read timeout)
)
except requests.RequestException as e:
logger.error(f"Authentication request failed (network): {e}")