Added git commit id to build process

This commit is contained in:
florian committed 2026-10-19 11:48:19 +02:00
1 parent b0f995d906
commit 64d9a5e715
5 files changed
+15 -5

No files matched your search

+4 -2
View File
@@ -1,4 +1,5 @@
import asyncio
import os
from contextlib import asynccontextmanager
from datetime import UTC, datetime
@@ -6,7 +7,6 @@ import uvicorn
from fastapi import Depends, FastAPI, HTTPException, Request
from pydantic import BaseModel, Field
from seadex import EntryNotFoundError, SeaDexEntry
from send_notifications import NotificationClient
from anilist_query import AniListError, AnimeNotFoundError, MissingAnimeName, get_anime_name
from db_module import (
@@ -17,6 +17,7 @@ from db_module import (
)
from metrics_server import REQUEST_COUNTER, metrics_api
from secret_manager import cleanup_secret_files
from send_notifications import NotificationClient
from simple_logger_handler import LOG_LEVEL, setup_logger
logger = setup_logger(__name__)
@@ -163,7 +164,7 @@ def add_anime(anime: AnimeCreate, db=Depends(get_db)):
)
if cursor.fetchone():
logger.debug(f"[FastAPI] Found existing entry, updating name and setting to active")
logger.debug("[FastAPI] Found existing entry, updating name and setting to active")
cursor.execute(
"UPDATE seadex_state SET anime_name = %s, active = 1 "
"WHERE anilist_id = %s",
@@ -236,6 +237,7 @@ def remove_anime(anime: AnimeCreate, db=Depends(get_db)):
async def start_servers():
logger.info("[Server] Starting main API (port 5000) and metrics server (port 9000)...")
logger.info(f"[Server] Build commit id={os.getenv("COMMIT_ID","unknown")}")
config_main = uvicorn.Config(api, host="0.0.0.0", port=5000, log_level=LOG_LEVEL.lower(),log_config=None)
config_metrics = uvicorn.Config(metrics_api, host="0.0.0.0", port=9000, log_level=LOG_LEVEL.lower(),log_config=None)