From dc9c197274ac8de3c727323b3ae2ccdb4733ce21 Mon Sep 17 00:00:00 2001 From: Admin MPCZ Date: Mon, 27 Apr 2026 23:00:58 +0200 Subject: [PATCH] fix(qualys/dashboard): timeout 120s->300s + log erreurs sur _fetch_asset_ids_by_tag (manque ENV-PRD/REC sur gros tags) --- app/services/qualys_service.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/services/qualys_service.py b/app/services/qualys_service.py index af7b5ac..d50712d 100644 --- a/app/services/qualys_service.py +++ b/app/services/qualys_service.py @@ -905,10 +905,11 @@ def _fetch_asset_ids_by_tag(db, tag_name): ]} }}, auth=(qualys_user, qualys_pass), - verify=False, timeout=120, proxies=proxies, + verify=False, timeout=300, proxies=proxies, headers={"Content-Type": "application/json"} ) if r.status_code != 200 or "SUCCESS" not in r.text: + print(f"[fetch_tag {tag_name}] HTTP {r.status_code} - {r.text[:200]}") return set() ids = set() for block in r.text.split("")[1:]: @@ -917,7 +918,8 @@ def _fetch_asset_ids_by_tag(db, tag_name): if aid and aid.isdigit(): ids.add(int(aid)) return ids - except Exception: + except Exception as ex: + print(f"[fetch_tag {tag_name}] {type(ex).__name__}: {ex}") return set()