added create / compare hashes and notify on miss-match for MinIO backups;
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
from typing import Union
|
||||
|
||||
import requests
|
||||
from django.conf import settings
|
||||
|
||||
@@ -31,11 +33,11 @@ class MinioService:
|
||||
:param filename: filename
|
||||
:return: bytes representation of the file or None on error
|
||||
"""
|
||||
file_bytes: bytes
|
||||
file_bytes: Union[bytes, None] = None
|
||||
try:
|
||||
url = settings.AWS_HOST + filename
|
||||
response = requests.get(url, stream=True)
|
||||
file_bytes=response.content
|
||||
except:
|
||||
print("Error downloading file from minio")
|
||||
return file_bytes
|
||||
return file_bytes
|
||||
|
||||
Reference in New Issue
Block a user