from typing import Any, Optional, Mapping, Callable, cast, Coroutine, Dict, Awaitable
from pathlib import Path
import datetime as dt
+import asyncio
from starlette.applications import Starlette
from starlette.routing import Route
middleware.append(Middleware(FileLoggingMiddleware, file_name=log_file))
exceptions: Dict[Any, Callable[[Request, Exception], Awaitable[Response]]] = {
- TimeoutError: timeout_error
+ TimeoutError: timeout_error,
+ asyncio.TimeoutError: timeout_error
}
async def _shutdown() -> None: