ishaq101 commited on
Commit
8a70f80
Β·
1 Parent(s): 797c17b

[NOTICKET] Update SAS key

Browse files
externals/storages/azure_blob.py CHANGED
@@ -19,14 +19,9 @@ logger = get_logger("azure-blob")
19
 
20
  async def get_blob_service_client() -> BlobServiceClient:
21
  try:
22
- if "azureai__container__key" not in os.environ:
23
- credential=DefaultAzureCredential()
24
- logger.info(f"βœ… Initialized Azure AI Cred: Using **Default Credential**")
25
- else:
26
- credential = AzureSasCredential(AzureBlobConstants.SAS_KEY)
27
- logger.info(f"βœ… Initialized Azure AI Cred: Using **Azure Key Credential**")
28
- # default_credential = DefaultAzureCredential()
29
- # blob_service_client = BlobServiceClient(url, credential=credential)
30
  _blob_service_client = BlobServiceClient(
31
  account_url=AzureBlobConstants.ENDPOINT,
32
  credential=credential,
 
19
 
20
  async def get_blob_service_client() -> BlobServiceClient:
21
  try:
22
+ credential = AzureSasCredential(AzureBlobConstants.SAS_KEY)
23
+ logger.info(f"βœ… Initialized Azure AI Cred: Using **Default Credential**")
24
+
 
 
 
 
 
25
  _blob_service_client = BlobServiceClient(
26
  account_url=AzureBlobConstants.ENDPOINT,
27
  credential=credential,
services/uploader/azure_blob_service.py CHANGED
@@ -23,15 +23,9 @@ logger = get_logger("azure blob")
23
  # --- Environment Variables ---
24
  async def get_blob_service_client() -> BlobServiceClient:
25
  try:
26
- if "azureai__container__key" not in os.environ:
27
- credential=DefaultAzureCredential()
28
- logger.info(f"βœ… Initialized Azure AI Cred: Using **Default Credential**")
29
- else:
30
- credential = AzureSasCredential(AzureBlobConstants.SAS_KEY)
31
- logger.info(f"βœ… Initialized Azure AI Cred: Using **Azure Key Credential**")
32
-
33
- # default_credential = DefaultAzureCredential()
34
- # blob_service_client = BlobServiceClient(url, credential=credential)
35
  _blob_service_client = BlobServiceClient(
36
  account_url=AzureBlobConstants.ENDPOINT,
37
  credential=credential,
 
23
  # --- Environment Variables ---
24
  async def get_blob_service_client() -> BlobServiceClient:
25
  try:
26
+ credential = AzureSasCredential(AzureBlobConstants.SAS_KEY)
27
+ logger.info(f"βœ… Initialized Azure AI Cred: Using **Azure Key Credential**")
28
+
 
 
 
 
 
 
29
  _blob_service_client = BlobServiceClient(
30
  account_url=AzureBlobConstants.ENDPOINT,
31
  credential=credential,