Issue #3 - Unbounded Query Results (OOM): - get_all_archived_history() now uses keyset pagination with bounded max_rows (50k default) - Added 'id' field to records from get_archived_history() and get_archived_history_keyset() - Protocol signature updated with page_size, max_rows, last_ban_id params Issue #7 - Docker Health Check Fails: - Added curl to Dockerfile.backend runtime image - HEALTHCHECK now uses 'curl -f http://localhost:8000/api/health' - compose.prod.yml: increased start_period to 40s, timeout to 10s - Frontend healthcheck proxies to backend /api/health Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
24 lines
616 B
Python
24 lines
616 B
Python
"""Health domain models.
|
|
|
|
Internal domain-focused models used by health_service. These represent the
|
|
business domain layer and are independent of HTTP response shapes.
|
|
|
|
Response models are defined in `app.models.config` and mappers convert domain
|
|
models to response models at the router boundary.
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
from dataclasses import dataclass
|
|
|
|
|
|
@dataclass(frozen=True)
|
|
class DomainServerStatus:
|
|
"""Cached fail2ban server health snapshot (domain model)."""
|
|
|
|
online: bool
|
|
version: str | None = None
|
|
active_jails: int = 0
|
|
total_bans: int = 0
|
|
total_failures: int = 0
|