Skip to content

Commit

Permalink
Drop files from immediate storage after they have been pushed
Browse files Browse the repository at this point in the history
After pushing to the encrypted storage, plain text file content will
be dropped. Closes #33
  • Loading branch information
mslw committed Aug 23, 2024
1 parent 731faec commit 73be410
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions server/store_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,20 @@ def add_file_to_dataset(dataset_root: Path, file: Path, home: Path):
"HOME": str(home)
})

subprocess.run(
[
"datalad",
"drop",
"--what", "filecontent",
"-d", str(dataset_root),
str(file)
],
check=True,
env={
**os.environ,
"HOME": str(home)
})

return subprocess.run(
[
"git",
Expand Down

0 comments on commit 73be410

Please sign in to comment.