New alert service
This commit is contained in:
13
services/external/app/main.py
vendored
13
services/external/app/main.py
vendored
@@ -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"""
|
||||
|
||||
Reference in New Issue
Block a user