Skip to content

Commit

Permalink
Merge pull request #2431 from bensteinberg/timestamp-replacement
Browse files Browse the repository at this point in the history
Timestamp replaced WARCs
  • Loading branch information
rebeccacremona committed Aug 3, 2018
2 parents ada62d8 + 823d676 commit 4ef7b99
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion perma_web/perma/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1121,7 +1121,7 @@ def write_uploaded_file(self, uploaded_file, cache_break=False):
def safe_delete_warc(self):
old_name = self.warc_storage_file()
if default_storage.exists(old_name):
new_name = old_name.replace('.warc.gz', '_replaced.warc.gz')
new_name = old_name.replace('.warc.gz', '_replaced_%d.warc.gz' % to_timestamp(timezone.now()))
default_storage.store_file(default_storage.open(old_name), new_name)
default_storage.delete(old_name)

Expand Down

0 comments on commit 4ef7b99

Please sign in to comment.