Add the backup sync service.

This commit is contained in:
2025-01-16 21:52:23 +02:00
parent 192f930f8a
commit 359dcdfca6
5 changed files with 29 additions and 0 deletions
@@ -7,6 +7,7 @@ from tui_rsync.core.components.backup_plan.application.repository.backup_plan_re
from tui_rsync.core.components.backup_plan.application.services.backup_plan_service import BackupPlanService
from tui_rsync.core.ports.configuration import UserDataPathsPort
from tui_rsync.core.ports.orm import DatabaseManagerPort
from tui_rsync.core.shared_kernel.components.backup.application.service import BackupSyncService
from tui_rsync.infrastructure.configuration import UserDataPaths
from tui_rsync.infrastructure.orm import SqliteDatabaseManager
@@ -41,3 +42,8 @@ class Configuration(Module):
@singleton
def provide_get_all_backup_backup_plans_query(self, database_manager: DatabaseManagerPort) -> GetAllBackupBackupPlansQuery:
return GetAllBackupBackupPlansQuery(database_manager)
@provider
@singleton
def provide_backup_sync_service(self, backup_plan_repository: BackupPlanRepositoryPort) -> BackupSyncService:
return BackupSyncService(backup_plan_repository)