Skip to content

Commit e754c5e

Browse files
authored
Merge pull request #3017 from activeloopai/creds_update
fix creds authentication
2 parents 75b24a5 + 5f3c0ab commit e754c5e

File tree

2 files changed

+3
-892
lines changed

2 files changed

+3
-892
lines changed

deeplake/core/storage/azure.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ def __getitem__(self, path):
104104

105105
def __delitem__(self, path):
106106
self.check_readonly()
107+
self._check_update_creds()
107108
blob_client = self.container_client.get_blob_client(
108109
f"{self.root_folder}/{path}"
109110
)
@@ -364,7 +365,8 @@ def _check_update_creds(self, force=False):
364365
from azure.core.credentials import AzureSasCredential # type: ignore
365366

366367
if self.expiration and (
367-
force or float(self.expiration) < datetime.now(timezone.utc).timestamp()
368+
force
369+
or float(self.expiration) - datetime.now(timezone.utc).timestamp() < 300
368370
):
369371
client = DeepLakeBackendClient(self.token)
370372
org_id, ds_name = self.tag.split("/")

0 commit comments

Comments
 (0)