backup
This commit is contained in:
@@ -291,8 +291,11 @@ async def _lifespan(app: FastAPI) -> AsyncGenerator[None, None]:
|
||||
)
|
||||
|
||||
# 3. Close HTTP session to release connections.
|
||||
await http_session.close()
|
||||
log.debug("http_session_closed")
|
||||
try:
|
||||
await http_session.close()
|
||||
log.debug("http_session_closed")
|
||||
except asyncio.CancelledError:
|
||||
log.debug("http_session_close_cancelled")
|
||||
|
||||
# 4. Shutdown external logging handler.
|
||||
if _external_log_handler:
|
||||
|
||||
@@ -23,7 +23,7 @@ router = APIRouter(prefix="/api/v1/setup", tags=["setup"])
|
||||
|
||||
|
||||
@router.get(
|
||||
"/",
|
||||
"",
|
||||
response_model=SetupStatusResponse,
|
||||
summary="Check whether setup has been completed",
|
||||
responses={
|
||||
|
||||
@@ -118,7 +118,7 @@ RATE_LIMIT_BANS_BAN_REQUESTS: Final[int] = 100
|
||||
RATE_LIMIT_BANS_UNBAN_REQUESTS: Final[int] = 100
|
||||
"""Max unban requests per IP per minute."""
|
||||
|
||||
RATE_LIMIT_BLOCKLIST_IMPORT_REQUESTS: Final[int] = 10
|
||||
RATE_LIMIT_BLOCKLIST_IMPORT_REQUESTS: Final[int] = 100
|
||||
"""Max blocklist import requests per IP per hour."""
|
||||
|
||||
RATE_LIMIT_CONFIG_UPDATE_REQUESTS: Final[int] = 50
|
||||
|
||||
@@ -80,7 +80,7 @@ def _load_vendored_fail2ban_client() -> type[object]:
|
||||
|
||||
return CSocket
|
||||
except ImportError:
|
||||
vendor_root = Path(__file__).resolve().parents[4] / "fail2ban-master"
|
||||
vendor_root = Path(__file__).resolve().parents[2] / "fail2ban-master"
|
||||
if not vendor_root.is_dir():
|
||||
raise
|
||||
|
||||
|
||||
Reference in New Issue
Block a user