refactor: remove local fs, add config class to common pacakge

This commit is contained in:
tao.chen
2026-07-31 12:46:31 +08:00
parent 872388775a
commit f288c90d37
18 changed files with 192 additions and 343 deletions
+4 -3
View File
@@ -7,15 +7,16 @@ the directory usable; downstream consumers (e.g. process.py) import it.
from __future__ import annotations
import os
import subprocess
import time
from pathlib import Path
from loguru import logger
WORKSPACES_ROOT = Path(os.getenv("WORKSPACES_ROOT", "/app/workspaces"))
REMOTE_BUCKET = os.getenv("REMOTE_BUCKET", "rustfs:workspaces")
from common.config import settings
WORKSPACES_ROOT = Path(settings.workspaces_root)
REMOTE_BUCKET = settings.remote_bucket
RCLONE_PROCESS: subprocess.Popen | None = None
+2 -2
View File
@@ -9,7 +9,6 @@ a thin wrapper over ``start_workspace``.
from __future__ import annotations
import asyncio
import os
import secrets
import subprocess
import time
@@ -18,10 +17,11 @@ from typing import TypedDict
from fastapi import HTTPException
from loguru import logger
from common.config import settings
from common.utils import get_free_port, start_process
from runtime.mount import WORKSPACES_ROOT
PUBLIC_BASE_URL = os.getenv("PUBLIC_BASE_URL", "http://localhost")
PUBLIC_BASE_URL = settings.public_base_url
class JupyterProcessRecord(TypedDict):