Make backups more modular. Get ready for snaps

This commit is contained in:
= 2024-12-13 16:11:50 -05:00
parent 59b9222b78
commit c29ba226a3
3 changed files with 11 additions and 0 deletions

View File

@ -0,0 +1,7 @@
from app.classes.shared.crypto_helper import CryptoHelper
class BackupManager:
def __init__(self, server_instance):
self.server_instance = server_instance
self.crypto_helper = CryptoHelper()

View File

@ -0,0 +1,2 @@
class CryptoHelper:
print("hi")

View File

@ -31,6 +31,7 @@ from app.classes.models.server_stats import HelperServerStats
from app.classes.models.management import HelpersManagement, HelpersWebhooks
from app.classes.models.users import HelperUsers
from app.classes.models.server_permissions import PermissionsServers
from app.classes.shared.backup_mgr import BackupManager
from app.classes.shared.console import Console
from app.classes.shared.helpers import Helpers
from app.classes.shared.file_helpers import FileHelpers
@ -183,6 +184,7 @@ class ServerInstance:
self.stats_helper = HelperServerStats(self.server_id)
self.last_backup_failed = False
self.server_registry = CollectorRegistry()
self.backup_manager = BackupManager(self)
try:
with open(