fix docker scraping

improve batch sync

add postgres upsert

fix sync locking

improve listing sync

speed up scraper

clean up project

prepare for github

update docker setup
This commit is contained in:
qananasikq
2026-04-13 16:35:08 +03:00
parent b9557922ed
commit a4c93a1df1
30 changed files with 2239 additions and 624 deletions

View File

@@ -1,4 +1,4 @@
# Dependency helpers для FastAPI-роутов.
# Вспомогательные зависимости для FastAPI-роутов.
from fastapi import Request

View File

@@ -1,5 +1,7 @@
# Роут проверки доступности сервиса и соединения с БД.
import logging
from fastapi import APIRouter, Depends
from sqlalchemy import text
@@ -7,6 +9,7 @@ from ..deps import get_persistence
from ...storage.db import PersistenceService
router = APIRouter()
logger = logging.getLogger("iaai_scraper.api.health")
@router.get("/health")
@@ -18,7 +21,7 @@ def health_check(persistence: PersistenceService = Depends(get_persistence)):
session.execute(text("SELECT 1"))
db_ok = True
except Exception:
pass
logger.warning("Health DB check failed", exc_info=True)
return {
"status": "ok" if db_ok else "degraded",