Refactor backend services and utilities

- Update service layer implementations
- Improve configuration handling utilities
- Update documentation tasks

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2026-04-25 18:39:30 +02:00
parent 83452ffc23
commit 420ea18fd9
12 changed files with 52 additions and 83 deletions

View File

@@ -6,6 +6,7 @@ import asyncio
import structlog
from app.utils.constants import FAIL2BAN_SOCKET_TIMEOUT_FAST
from app.utils.fail2ban_client import (
Fail2BanClient,
Fail2BanConnectionError,
@@ -64,8 +65,7 @@ class Fail2BanMetadataService:
async def _resolve_db_path(self, socket_path: str) -> str:
"""Query fail2ban for the configured database path."""
socket_timeout: float = 5.0
async with Fail2BanClient(socket_path, timeout=socket_timeout) as client:
async with Fail2BanClient(socket_path, timeout=FAIL2BAN_SOCKET_TIMEOUT_FAST) as client:
response = await client.send(["get", "dbfile"])
if not isinstance(response, tuple) or len(response) != 2: