同步异常兜底

This commit is contained in:
tianmo committed 2026-10-17 15:08:21 +08:00
1 parent 9cb8552a99
commit a1b4a63552
20 files changed
+754 -54

No files matched your search

+12
View File
@@ -53,6 +53,18 @@ export async function getBackendForKey(key: string): Promise<StorageBackend> {
}
}
export async function getBackendById(
backendId: string
): Promise<StorageBackend | null> {
const fromEnv = createBackendFromEnv()
if (fromEnv) return fromEnv.id === backendId ? fromEnv : null
ensureDefaultBackends()
const row = getStorageBackendRow(backendId)
if (!row) return null
return createBackendInstance(row)
}
export function getActiveBackendRow(): StorageBackendRow | null {
const fromEnv = createBackendFromEnv()
if (fromEnv) {