mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-08 23:32:40 +02:00
feat: enhance sandbox functionality with threading support and file download capabilities
This commit is contained in:
parent
38b9e8dcc5
commit
b5301fa438
5 changed files with 103 additions and 29 deletions
|
|
@ -86,9 +86,8 @@ async def download_sandbox_file(
|
|||
|
||||
# Fall back to live sandbox download
|
||||
try:
|
||||
sandbox = await get_or_create_sandbox(thread_id)
|
||||
raw_sandbox = sandbox._sandbox
|
||||
content: bytes = await asyncio.to_thread(raw_sandbox.fs.download_file, path)
|
||||
sandbox, _ = await get_or_create_sandbox(thread_id)
|
||||
content: bytes = await asyncio.to_thread(sandbox.download_file, path)
|
||||
except Exception as exc:
|
||||
logger.warning("Sandbox file download failed for %s: %s", path, exc)
|
||||
raise HTTPException(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue