mirror of
https://github.com/VectifyAI/PageIndex.git
synced 2026-07-15 21:11:05 +02:00
style(cloud): annotate best-effort response-close in query_stream cleanup
Replace the bare `except Exception: pass` around resp.close() in the query_stream finally block with an explanatory comment and a debug log (flagged by github-code-quality on PR #272). Behavior unchanged — the close is best-effort to unblock the background thread. Claude-Session: https://claude.ai/code/session_01Kx5DgKbhK1N8autqXH8SmS
This commit is contained in:
parent
154c483fb1
commit
4a6a948ac2
1 changed files with 4 additions and 1 deletions
|
|
@ -465,7 +465,10 @@ class CloudBackend:
|
|||
try:
|
||||
resp.close()
|
||||
except Exception:
|
||||
pass
|
||||
# Best-effort: the response may already be closed/invalid
|
||||
# during teardown; closing is just to unblock the thread.
|
||||
logger.debug("Ignoring error closing streaming response during cleanup",
|
||||
exc_info=True)
|
||||
thread.join(timeout=5)
|
||||
|
||||
def _get_all_doc_ids(self, collection: str) -> list[str]:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue