Skip to content

Commit

Permalink
fixed backup
Browse files Browse the repository at this point in the history
  • Loading branch information
Rob Carver committed Nov 20, 2023
1 parent 21bedad commit 617240c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions sysproduction/backup_arctic_to_csv.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

def backup_db_to_csv():
data = dataBlob(log_name="backup_db_to_csv")
backup_object = backupArcticToCsv(data)
backup_object = backupDbToCsv(data)
backup_object.backup_db_to_csv()

return None
Expand All @@ -48,7 +48,7 @@ def quick_backup_of_all_price_data_including_expired():
backup_futures_contract_prices_to_csv(backup_data, ignore_long_expired=False)


class backupArcticToCsv:
class backupDbToCsv:
def __init__(self, data):
self.data = data

Expand Down
8 changes: 4 additions & 4 deletions sysproduction/run_backups.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from syscontrol.run_process import processToRun
from sysproduction.backup_arctic_to_csv import backupArcticToCsv
from sysproduction.backup_arctic_to_csv import backupDbToCsv
from sysproduction.backup_mongo_data_as_dump import backupMongo
from sysproduction.backup_state_files import backupStateFiles
from sysdata.data_blob import dataBlob
Expand All @@ -14,16 +14,16 @@ def run_backups():


def get_list_of_timer_functions_for_backup():
data_arctic_backups = dataBlob(log_name="backup_arctic_to_csv")
data_db_backups = dataBlob(log_name="backup_db_to_csv")
data_state_files = dataBlob(log_name="backup_files")
data_mongo_dump = dataBlob(log_name="backup_mongo_data_as_dump")

arctic_backup_object = backupArcticToCsv(data_arctic_backups)
db_backup_object = backupDbToCsv(data_db_backups)
statefile_backup_object = backupStateFiles(data_state_files)
mongodump_backup_object = backupMongo(data_mongo_dump)

list_of_timer_names_and_functions = [
("backup_arctic_to_csv", arctic_backup_object),
("backup_db_to_csv", db_backup_object),
("backup_mongo_data_as_dump", mongodump_backup_object),
("backup_files", statefile_backup_object),
]
Expand Down

0 comments on commit 617240c

Please sign in to comment.