Skip to content

Commit

Permalink
Merge pull request #8311 from achouhan09/azure-cache
Browse files Browse the repository at this point in the history
Added a fix in upload_object for azure namespace cache bucket
  • Loading branch information
achouhan09 authored Sep 3, 2024
2 parents 23add37 + c2aee5c commit 0d9d1f7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/sdk/namespace_blob.js
Original file line number Diff line number Diff line change
Expand Up @@ -747,6 +747,7 @@ class NamespaceBlob {
size,
etag,
create_time: flat_obj.lastModified,
last_modified_time: flat_obj.lastModified,
content_type: flat_obj.contentType,
xattr: modified_xattr,
tag_count: tag_count,
Expand Down
3 changes: 3 additions & 0 deletions src/sdk/namespace_cache.js
Original file line number Diff line number Diff line change
Expand Up @@ -683,6 +683,9 @@ class NamespaceCache {
async_get_last_modified_time: async () => {
const upload_res = await hub_promise;
const last_modified_time = (new Date(upload_res.last_modified_time)).getTime();
if (isNaN(last_modified_time)) {
throw new Error('Invalid last_modified_time returned from hub_promise, Expected a valid date or timestamp.');
}
return last_modified_time;
},
upload_chunks_hook: this.update_cache_stats_hook(params.bucket),
Expand Down

0 comments on commit 0d9d1f7

Please sign in to comment.