Skip to content
This repository has been archived by the owner on Jun 6, 2024. It is now read-only.

Commit

Permalink
revert to not use api chart queries for now.
Browse files Browse the repository at this point in the history
  • Loading branch information
Heavybullets8 committed May 24, 2024
1 parent 0a70163 commit b59ef0e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions functions/backup_restore/database/restore.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class RestoreCNPGDatabase:
"""

@type_check
def __init__(self, app_name: str, backup_file: Path):
def __init__(self, app_name: str, chart_name: str, backup_file: Path):
"""
Initialize the RestoreCNPGDatabase class.
Expand All @@ -31,7 +31,7 @@ def __init__(self, app_name: str, backup_file: Path):
self.chart_info = APIChartFetcher(app_name)
self.backup_file = backup_file
self.app_name = app_name
self.chart_name = self.chart_info.chart_name
self.chart_name = chart_name
self.namespace = f"ix-{app_name}"
self.db_utils = DatabaseUtils(self.namespace)
self.primary_pod = None
Expand Down
2 changes: 1 addition & 1 deletion functions/backup_restore/restore/restore_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def restore(self):
for app_name in self.chart_info.cnpg_apps:
try:
self.logger.info(f"Restoring database for {app_name}...")
db_manager = RestoreCNPGDatabase(app_name, self.chart_info.get_file(app_name, "database"))
db_manager = RestoreCNPGDatabase(app_name, self.chart_info.get_chart_name(app_name), self.chart_info.get_file(app_name, "database"))
result = db_manager.restore()
if not result["success"]:
self.failures[app_name].append(result["message"])
Expand Down

0 comments on commit b59ef0e

Please sign in to comment.