-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't backup if draft modified
timestamp hasn't advanced
#245
Conversation
Codecov Report
@@ Coverage Diff @@
## draft #245 +/- ##
==========================================
- Coverage 78.30% 77.90% -0.40%
==========================================
Files 14 14
Lines 1954 2014 +60
Branches 323 341 +18
==========================================
+ Hits 1530 1569 +39
- Misses 301 314 +13
- Partials 123 131 +8
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great. I didn't dare to try though ;) needs a little more of conditions and "unittests" for paranoid Yarik.
Coolio, thank you! I will add a cron job to do a run with --verify-timestamps once a day |
Closes #239.
This PR makes the following changes:
modified
timestamp is now stored in.dandi/assets-state.json
at the end of the backup. Intermediate commits made along the way store themodified
timestamp of the most recent asset at that point..dandi/assets-state.json
exists and the timestamp within is not earlier than the draft's currentmodified
date, no backup is performed.created
timestamp is now stored in.dandi/assets-state.json
.--verify-timestamps
flag has been added toupdate-from-backup
; when given, if a backup would be skipped due to timestamps, the backup is instead run, and an error occurs if anything would be changed.--gc-assets
flag is passed toupdate-from-backup
.