Spaces:
Sleeping
Sleeping
Commit ·
245310d
1
Parent(s): dfaa4d6
fix(upload): missing asyncio import — module-level Lock() fired NameError on import
Browse filesbackend/uploaded_docs.py used asyncio.Lock() + asyncio.wait_for but
never imported asyncio. The module-level _UPLOAD_EXTRACTION_LOCK =
asyncio.Lock() raised NameError at import time, which surfaced as
"Indexing failed: NameError: name 'asyncio' is not defined" on every
POST /api/upload-policy after dfaa4d6.
Added `import asyncio` at the top of backend/uploaded_docs.py.
Verified live by re-importing the module under the project venv.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- backend/uploaded_docs.py +1 -0
backend/uploaded_docs.py
CHANGED
|
@@ -56,6 +56,7 @@ ONE doc must not abort boot, but the failure is logged loudly).
|
|
| 56 |
|
| 57 |
from __future__ import annotations
|
| 58 |
|
|
|
|
| 59 |
import hashlib
|
| 60 |
import json
|
| 61 |
import logging
|
|
|
|
| 56 |
|
| 57 |
from __future__ import annotations
|
| 58 |
|
| 59 |
+
import asyncio
|
| 60 |
import hashlib
|
| 61 |
import json
|
| 62 |
import logging
|