mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2025-01-19 01:35:28 +01:00
Make backups more modular. Get ready for snaps
This commit is contained in:
parent
59b9222b78
commit
c29ba226a3
7
app/classes/shared/backup_mgr.py
Normal file
7
app/classes/shared/backup_mgr.py
Normal 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()
|
2
app/classes/shared/crypto_helper.py
Normal file
2
app/classes/shared/crypto_helper.py
Normal file
@ -0,0 +1,2 @@
|
||||
class CryptoHelper:
|
||||
print("hi")
|
@ -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(
|
||||
|
Loading…
x
Reference in New Issue
Block a user