Moved database module to separate library
Build & Publish to GHCR / build (push) Successful in 1m39s
Build & Publish to GHCR / build (push) Successful in 1m39s
This commit is contained in:
1 parent
c7691dcf15
commit
abf06c43b5
3 files changed
+3
-133
No files matched your search
+2
-2
@@ -5,7 +5,7 @@ from starlette.exceptions import HTTPException as StarletteHTTPException
|
||||
from typing import Dict
|
||||
from pydantic import BaseModel
|
||||
from validator import verify_api_key
|
||||
from db import get_db, create_connection_pool, close_connection_pool, start_healthcheck_thread
|
||||
from db_module import get_db, create_connection_pool, close_connection_pool, start_healthcheck_thread
|
||||
from simple_logger_handler import setup_logger, LOG_LEVEL
|
||||
from rabbitmq_handler import RabbitMQProducer
|
||||
import uvicorn
|
||||
@@ -30,7 +30,7 @@ async def lifespan(app: FastAPI):
|
||||
logger.info("Starting application...")
|
||||
|
||||
logger.info("Creating MySQL connection pool...")
|
||||
create_connection_pool()
|
||||
create_connection_pool("ApiInternalPool")
|
||||
start_healthcheck_thread()
|
||||
logger.info("MySQL healthcheck thread started.")
|
||||
|
||||
|
||||
Reference in new issue
Block a user