Develop #16
@@ -160,7 +160,7 @@ def _bump_last_used(record: JupyterProcessRecord) -> None:
|
||||
|
||||
async def start_workspace(ws_id: str) -> dict:
|
||||
async with get_workspace_lock(ws_id):
|
||||
workspace_path = WORKSPACES_ROOT / ws_id
|
||||
workspace_path = (WORKSPACES_ROOT / ws_id).resolve()
|
||||
workspace_path.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
if ws_id in JUPYTER_PROCESSES:
|
||||
@@ -202,7 +202,7 @@ async def start_workspace(ws_id: str) -> dict:
|
||||
"--allow-root",
|
||||
f"--ServerApp.token={token}",
|
||||
f"--ServerApp.base_url={base_path}",
|
||||
"--notebook-dir=.",
|
||||
f"--notebook-dir={workspace_path}",
|
||||
"--ServerApp.terminals_enabled=False",
|
||||
"--NotebookApp.terminals_enabled=False",
|
||||
"--ServerApp.allow_origin=*",
|
||||
@@ -212,7 +212,7 @@ async def start_workspace(ws_id: str) -> dict:
|
||||
]
|
||||
|
||||
try:
|
||||
process, log_file = start_process(cmd, workspace_path)
|
||||
process, log_file = start_process(cmd, workspace_path.as_posix())
|
||||
except Exception as e:
|
||||
logger.error(f"Failed to start Jupyter for {ws_id}: {e}")
|
||||
raise HTTPException(
|
||||
|
||||
Reference in New Issue
Block a user