mirror of
https://github.com/langgenius/dify.git
synced 2026-05-05 18:08:07 +08:00
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:
@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user