refactor: remove local fs, add config class to common pacakge
This commit is contained in:
@@ -4,10 +4,12 @@ version = "0.2.0"
|
||||
requires-python = ">=3.12"
|
||||
dependencies = [
|
||||
"SQLAlchemy==2.0.51",
|
||||
"greenlet>=3.0.0",
|
||||
"apscheduler>=3.11.3",
|
||||
"asyncmy==0.2.11",
|
||||
"boto3>=1.34,<2",
|
||||
"fastapi==0.116.1",
|
||||
"pydantic-settings>=2.14.2",
|
||||
]
|
||||
|
||||
[build-system]
|
||||
|
||||
@@ -49,7 +49,7 @@ class StorageObjects(Base):
|
||||
comment="working_copy/public_script/data_resource/version_artifact/snapshot/run_log/run_result",
|
||||
)
|
||||
storage_backend: Mapped[str] = mapped_column(
|
||||
String(16), nullable=False, comment="workspace_fs/rustfs"
|
||||
String(16), nullable=False, comment="rustfs"
|
||||
)
|
||||
storage_uri: Mapped[str] = mapped_column(String(1500), nullable=False)
|
||||
file_name: Mapped[str] = mapped_column(String(255), nullable=False)
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import asyncio
|
||||
import os
|
||||
from datetime import UTC, datetime
|
||||
from typing import Any, Callable
|
||||
|
||||
from fastapi import FastAPI, Response, status
|
||||
|
||||
from common.config import settings
|
||||
|
||||
|
||||
def _target_list() -> list[str]:
|
||||
value = os.getenv("READINESS_TARGETS", "")
|
||||
value = settings.readiness_targets
|
||||
return [item.strip() for item in value.split(",") if item.strip()]
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user