Actually start the background thread to check db health
All checks were successful
Build & Publish to GHCR / build (push) Successful in 28s

This commit is contained in:
Florian 2025-10-12 15:34:04 +02:00
parent 85a58adc98
commit e4ddac872b

View File

@ -6,7 +6,7 @@ from typing import Optional,List
from pydantic import BaseModel
from validator import is_valid_platform,is_valid_token,verify_api_key
from secret_handler import encrypt_token
from db import get_db, create_connection_pool, close_connection_pool
from db import get_db, create_connection_pool, close_connection_pool, start_healthcheck_thread
from logger_handler import setup_logger
import uuid
from hashlib import sha256
@ -41,6 +41,8 @@ async def lifespan(app: FastAPI):
logger.info("Creating MySQL connection pool...")
create_connection_pool()
start_healthcheck_thread()
logger.info("MySQL healthcheck thread started.")
yield
logger.info("Closing MySQL connection pool...")
close_connection_pool()