Standardize async offloading behind shared executor helper

This commit is contained in:
2026-04-11 20:40:08 +02:00
parent ae81a8f5be
commit cd69550053
13 changed files with 199 additions and 101 deletions

View File

@@ -7,6 +7,7 @@ fail2ban socket operations.
from __future__ import annotations
import asyncio
from app.utils.async_utils import run_blocking
import re
from pathlib import Path
@@ -70,7 +71,7 @@ async def preview_log(req: LogPreviewRequest) -> LogPreviewResponse:
)
try:
raw_lines = await asyncio.get_event_loop().run_in_executor(
raw_lines = await run_blocking(
None,
_read_tail_lines,
str(path),