main commit
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2025-10-16 16:30:25 +09:00
parent 91c7e04474
commit 537e7b363f
1146 changed files with 45926 additions and 77196 deletions

View File

@@ -1,5 +1,4 @@
"""The Azure Storage Block Blob backend for Celery."""
from kombu.transport.azurestoragequeues import Transport as AzureStorageQueuesTransport
from kombu.utils import cached_property
from kombu.utils.encoding import bytes_to_str
@@ -29,13 +28,6 @@ class AzureBlockBlobBackend(KeyValueStoreBackend):
container_name=None,
*args,
**kwargs):
"""
Supported URL formats:
azureblockblob://CONNECTION_STRING
azureblockblob://DefaultAzureCredential@STORAGE_ACCOUNT_URL
azureblockblob://ManagedIdentityCredential@STORAGE_ACCOUNT_URL
"""
super().__init__(*args, **kwargs)
if azurestorage is None or azurestorage.__version__ < '12':
@@ -73,26 +65,11 @@ class AzureBlockBlobBackend(KeyValueStoreBackend):
the container is created if it doesn't yet exist.
"""
if (
"DefaultAzureCredential" in self._connection_string or
"ManagedIdentityCredential" in self._connection_string
):
# Leveraging the work that Kombu already did for us
credential_, url = AzureStorageQueuesTransport.parse_uri(
self._connection_string
)
client = BlobServiceClient(
account_url=url,
credential=credential_,
connection_timeout=self._connection_timeout,
read_timeout=self._read_timeout,
)
else:
client = BlobServiceClient.from_connection_string(
self._connection_string,
connection_timeout=self._connection_timeout,
read_timeout=self._read_timeout,
)
client = BlobServiceClient.from_connection_string(
self._connection_string,
connection_timeout=self._connection_timeout,
read_timeout=self._read_timeout
)
try:
client.create_container(name=self._container_name)