Files
model-platform/backend
tao.chen 6050880c98 refactor(common.storage): drop sync storage abstraction and example_usage
The async-only direction was already the only one used in production:
* create_storage never accepted mode=sync; build_storage_config always
  emitted mode=async; zero callers referenced StorageBackend / SyncData
  / S3StorageBackend.sync / LocalStorageBackend.sync anywhere.
* Drop the parallel sync base class, the sync concrete classes in
  backends/local.py and backends/s3.py, and the boto3 dependency.
* Drop example_usage.py (zero importers; demonstration code, not part
  of the public surface).
* Rename LocalAsyncStorageBackend -> LocalStorageBackend,
  S3AsyncStorageBackend -> S3StorageBackend to reflect the single
  remaining class per type.
* Tighten create_storage: any mode=... key now raises StorageConfigError
  with the new pointer (settings.storage_backend controls behavior).
* Cleanup call sites: schedule.application.service.build_object_store
  no longer passes mode=async to create_storage.
* Cosmetic touch-ups in backend/services/storage.py and
  common/config.py docstrings where they still said "boto3" instead of
  "S3 client".

Public API surface preserved: AsyncStorageBackend / ObjectMeta /
create_storage / build_storage_config / register_backend all keep
their names and call signatures. backend tests: 136 passed.
2026-08-24 10:29:08 +08:00
..
2026-08-17 15:59:19 +08:00
2026-08-12 12:21:48 +08:00

Backend

统一 FastAPI 管理服务。包含用户、Workspace、脚本、稳定版本、调度定义、 立即运行以及 S3 对象接口。原 platform_apistorage_api 已在此 模块合并,外部 REST 契约保持不变。

底层走的是 common.storage.AsyncStorageBackend 抽象,按 settings.storage_backend 切换 s3 / local 两种实现。