Skip to content

Commit

Permalink
Merge pull request #3017 from activeloopai/creds_update
Browse files Browse the repository at this point in the history
fix creds authentication
  • Loading branch information
activesoull authored Jan 18, 2025
2 parents 75b24a5 + 5f3c0ab commit e754c5e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 892 deletions.
4 changes: 3 additions & 1 deletion deeplake/core/storage/azure.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ def __getitem__(self, path):

def __delitem__(self, path):
self.check_readonly()
self._check_update_creds()
blob_client = self.container_client.get_blob_client(
f"{self.root_folder}/{path}"
)
Expand Down Expand Up @@ -364,7 +365,8 @@ def _check_update_creds(self, force=False):
from azure.core.credentials import AzureSasCredential # type: ignore

if self.expiration and (
force or float(self.expiration) < datetime.now(timezone.utc).timestamp()
force
or float(self.expiration) - datetime.now(timezone.utc).timestamp() < 300
):
client = DeepLakeBackendClient(self.token)
org_id, ds_name = self.tag.split("/")
Expand Down
Loading

0 comments on commit e754c5e

Please sign in to comment.