faster purge operation
This commit is contained in:
parent
2128f3bea9
commit
9b56870414
@ -33,10 +33,9 @@ class AzureStorageAdapter(StorageAdapter):
|
||||
return container_client if container_client.exists() else self.__client.create_container(container_name)
|
||||
|
||||
def put(self, bucket_name, object_name, data):
|
||||
pass
|
||||
# container_client = self.__provide_container_client(bucket_name)
|
||||
# blob_client = container_client.get_blob_client(object_name)
|
||||
# blob_client.upload_blob(data, overwrite=True)
|
||||
container_client = self.__provide_container_client(bucket_name)
|
||||
blob_client = container_client.get_blob_client(object_name)
|
||||
blob_client.upload_blob(data, overwrite=True)
|
||||
|
||||
def get(self, bucket_name, object_name):
|
||||
pass
|
||||
@ -55,5 +54,6 @@ class AzureStorageAdapter(StorageAdapter):
|
||||
@_retry(ResourceExistsError)
|
||||
def purge(self, bucket_name):
|
||||
logging.debug(f"Purging Azure container '{bucket_name}'")
|
||||
self.__client.delete_container(bucket_name)
|
||||
self.__provide_container_client(bucket_name)
|
||||
container_client = self.__client.get_container_client(bucket_name)
|
||||
blobs = container_client.list_blobs()
|
||||
container_client.delete_blobs(*blobs)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user