You've already forked RekomenciBackend
feat(): prediction pipeline
This commit is contained in:
@@ -2,7 +2,7 @@ from collections.abc import AsyncIterable
|
||||
|
||||
from aioboto3.session import Session
|
||||
from dishka import Provider, Scope, provide
|
||||
from httpx import AsyncClient
|
||||
from httpx import AsyncClient, Timeout
|
||||
from sqlalchemy.ext.asyncio import AsyncEngine, AsyncSession, create_async_engine
|
||||
|
||||
from template_project.adapters.ml_api_gateway import MlApiGateway
|
||||
@@ -40,5 +40,6 @@ class ConnectionProvider(Provider):
|
||||
|
||||
@provide(scope=Scope.APP)
|
||||
async def ml_api_gateway(self, config: MlApiConfiguration) -> AsyncIterable[MlApiGateway]:
|
||||
async with AsyncClient(base_url=config.url) as client:
|
||||
timeout = Timeout(30.0, read=30.0)
|
||||
async with AsyncClient(base_url=config.url, timeout=timeout) as client:
|
||||
yield MlApiGateway(client)
|
||||
|
||||
Reference in New Issue
Block a user