Skip to content

Commit

Permalink
Merge pull request #710 from zigouras/backup-copy-not-move
Browse files Browse the repository at this point in the history
Copy tiles file to backup/ instead of move
  • Loading branch information
CodeWritingCow authored Jun 25, 2024
2 parents 53ac15d + 53db026 commit c7eee60
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion data/src/classes/backup_archive_database.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def backup_tiles_file(self):
name, ext = os.path.splitext(blob.name)
backup_file_name: str = tile_file_backup_directory + "/" + name + suffix + ext
log.debug(backup_file_name)
bucket.rename_blob(blob,new_name=backup_file_name)
bucket.copy_blob(blob,destination_bucket=bucket,new_name=backup_file_name)
count += 1
if count == 0:
log.warning("No files were found to back up.")
2 changes: 1 addition & 1 deletion data/src/classes/diff_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def __init__(self, timestamp_string: str = None):
"""
self.diff_tables = self._list_diff_tables()
self.timestamp_string = timestamp_string
self.report: str = "The back-end data has been fully refreshed. Here is the diff report on " + len(self.diff_tables) + " key tables.\nLegend: table A = new data, table B = old data.\n\n"
self.report: str = "The back-end data has been fully refreshed. Here is the diff report on " + str(len(self.diff_tables)) + " key tables.\nLegend: table A = new data, table B = old data.\n\n"

def run(self):
"""
Expand Down

0 comments on commit c7eee60

Please sign in to comment.