refactor(storage): unified storage cache layer and preasign interface

- Updated storage wrappers to utilize a new base class, StorageWrapper, for better delegation of methods.
- Introduced SilentStorage to handle read operations gracefully by returning empty values instead of raising exceptions.
- Enhanced CachedPresignStorage to support batch caching of download URLs, improving performance.
- Refactored FilePresignStorage to support both presigned URLs and signed proxy URLs for downloads.
- Updated AppAssetService to utilize the new storage structure, ensuring consistent asset management.
This commit is contained in:
Harry
2026-01-23 17:01:10 +08:00
parent 3165f3adbe
commit 248fa38c34
12 changed files with 209 additions and 88 deletions

View File

@ -48,12 +48,10 @@ def _render_download_script(root_path: str, download_commands: str) -> str:
wait
if [ -s "${{fail_log}}" ]; then
echo 'Failed downloads:' >&2
cat "${{fail_log}}" >&2
mv "${{fail_log}}" "${{download_root}}/DOWNLOAD_FAILURES.txt"
else
rm -f "${{fail_log}}"
exit 1
fi
rm -f "${{fail_log}}"
"""
return textwrap.dedent(script).strip()