Skip to content

Commit

Permalink
use templates when uploading staging store
Browse files Browse the repository at this point in the history
  • Loading branch information
magland committed Apr 19, 2024
1 parent f734328 commit 91ceae7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lindi/LindiStagingStore/LindiStagingStore.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def upload(
self.consolidate_chunks()
rfs = self._base_store.rfs
rfs = json.loads(json.dumps(rfs)) # deep copy
LindiReferenceFileSystemStore.replace_meta_file_contents_with_dicts(rfs)
LindiReferenceFileSystemStore.replace_meta_file_contents_with_dicts_in_rfs(rfs)
blob_mapping = _upload_directory_of_blobs(self._staging_area.directory, on_upload_blob=on_upload_blob)
for k, v in rfs['refs'].items():
if isinstance(v, list) and len(v) == 3:
Expand All @@ -140,6 +140,7 @@ def upload(
rfs['refs'][k][0] = url2
with tempfile.TemporaryDirectory() as tmpdir:
rfs_fname = f"{tmpdir}/rfs.lindi.json"
LindiReferenceFileSystemStore.use_templates_in_rfs(rfs)
_write_rfs_to_file(rfs=rfs, output_file_name=rfs_fname)
return on_upload_main(rfs_fname)

Expand Down

0 comments on commit 91ceae7

Please sign in to comment.