refactor: remove local fs, add config class to common pacakge
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user