Fix orchestrator issues

This commit is contained in:
Urtzi Alfaro
2025-11-05 22:54:14 +01:00
parent 80728eaa4e
commit 3ad093d38b
9 changed files with 422 additions and 484 deletions

View File

@@ -46,7 +46,6 @@ class EnhancedNotificationService:
'log': self.log_repo
}
@transactional
async def create_notification(
self,
tenant_id: str,
@@ -70,11 +69,11 @@ class EnhancedNotificationService:
try:
async with self.database_manager.get_session() as db_session:
async with UnitOfWork(db_session) as uow:
# Register repositories
notification_repo = uow.register_repository("notifications", NotificationRepository)
template_repo = uow.register_repository("templates", TemplateRepository)
preference_repo = uow.register_repository("preferences", PreferenceRepository)
log_repo = uow.register_repository("logs", LogRepository)
# Register repositories with model classes
notification_repo = uow.register_repository("notifications", NotificationRepository, Notification)
template_repo = uow.register_repository("templates", TemplateRepository, NotificationTemplate)
preference_repo = uow.register_repository("preferences", PreferenceRepository, NotificationPreference)
log_repo = uow.register_repository("logs", LogRepository, NotificationLog)
notification_data = {
"tenant_id": tenant_id,