mirror of
https://github.com/tiennm99/DocsGPT.git
synced 2026-10-14 12:16:20 +00:00
fix: stability improvements on event loop
This commit is contained in:
1 parent
e889392eba
commit
fb66a0b230
14 files changed
+322
-134
No files matched your search
@@ -51,6 +51,7 @@ def _sanitize_header_filename(filename: Optional[str], fallback: str) -> str:
|
||||
|
||||
|
||||
def _ascii_fold(value: str) -> str:
|
||||
"""Drop accents and any other non-ASCII characters from ``value``."""
|
||||
return unicodedata.normalize("NFKD", value).encode("ascii", "ignore").decode("ascii")
|
||||
|
||||
|
||||
@@ -130,7 +131,8 @@ async def download_artifact(request: Request) -> Response:
|
||||
decoded, error = await authenticate(request)
|
||||
if error is not None:
|
||||
return error
|
||||
bind_log_context("artifact_download", decoded.get("sub") if decoded else None)
|
||||
# Same endpoint value the Flask-RESTX route logged, so saved log queries keep matching.
|
||||
bind_log_context("artifacts_download_artifact", decoded.get("sub") if decoded else None)
|
||||
query = request.query_params
|
||||
|
||||
try:
|
||||
|
||||
Reference in new issue
Block a user