New alert service

This commit is contained in:
Urtzi Alfaro
2025-12-05 20:07:01 +01:00
parent 1fe3a73549
commit 667e6e0404
393 changed files with 26002 additions and 61033 deletions

View File

@@ -7,7 +7,8 @@ from fastapi import FastAPI
from sqlalchemy import text
from app.core.config import settings
from app.core.database import database_manager
from app.services.messaging import setup_messaging, cleanup_messaging
# Removed import of non-existent messaging module
# External service will use unified messaging from base class
from shared.service_base import StandardFastAPIService
from shared.redis_utils import initialize_redis, close_redis
# Include routers
@@ -139,13 +140,15 @@ class ExternalService(StandardFastAPIService):
)
async def _setup_messaging(self):
"""Setup messaging for external service"""
await setup_messaging()
self.logger.info("External service messaging initialized")
"""Setup messaging for external service using unified messaging"""
# The base class will handle the unified messaging setup
# For external service, no additional setup is needed
self.logger.info("External service unified messaging initialized")
async def _cleanup_messaging(self):
"""Cleanup messaging for external service"""
await cleanup_messaging()
# The base class will handle the unified messaging cleanup
self.logger.info("External service unified messaging cleaned up")
async def on_startup(self, app: FastAPI):
"""Custom startup logic for external service"""