Skip to content

Commit

Permalink
Update backup_parquet_data_to_remote.py
Browse files Browse the repository at this point in the history
  • Loading branch information
robcarver17 authored Nov 21, 2023
1 parent 75e6f30 commit 9a43904
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions sysproduction/backup_parquet_data_to_remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,25 +19,27 @@ def backup_parquet_data_to_remote():



def get_parquet_directory():
data = dataBlob()
def get_parquet_directory(data):
return data.parquet_root_directory


class backupParquet(object):
def __init__(self, data):
self.data = data

def backup_parquet_data_to_remote(self):
def backup_parquet(self):
data = self.data
log = data.log
log.debug("Copying data to backup destination")
backup_parquet_data(data)

backup_parquet_data_to_remote_with_data(data)

def backup_parquet_data_to_remote():
## if called as standalone script
data = dataBlob()
backup_parquet_data_to_remote_with_data(data)

def backup_parquet_data(data):
source_path = get_parquet_directory()
def backup_parquet_data_to_remote_with_data(data):
source_path = get_parquet_directory(data)
destination_path = get_parquet_backup_directory()
data.log.debug("Copy from %s to %s" % (source_path, destination_path))
os.system("rsync -av %s %s" % (source_path, destination_path))
Expand Down

0 comments on commit 9a43904

Please sign in to comment.