Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ENV POETRY_VIRTUALENVS_CREATE=false \
WORKDIR /code
RUN pip install poetry
COPY pyproject.toml poetry.lock /code/
RUN poetry install --without dev
RUN poetry install --without dev --no-root
COPY geocoder_api/ /code/geocoder_api

RUN groupadd -r fastapi && useradd -r -g fastapi fastapi
Expand Down
1 change: 1 addition & 0 deletions geocoder_api/models/photon.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ class MultiPolygon(BaseModel):
| Literal["county"]
| Literal["state"]
| Literal["country"]
| Literal["other"]
)


Expand Down
4 changes: 2 additions & 2 deletions geocoder_api/routers/geocoding.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ async def geocoding(
float | None, Query(description="Geocode with priority to this longitude")
] = None,
) -> FeatureCollection:
async with AsyncClient() as client:
async with AsyncClient(timeout=20) as client:
# Remove None-parameters
params = {
k: v
Expand All @@ -58,7 +58,7 @@ async def reverse_geocoding(
lon: Annotated[float, Query(description="Longitude")],
shared_params: Annotated[dict, Depends(get_shared_query_params)],
) -> FeatureCollection:
async with AsyncClient() as client:
async with AsyncClient(timeout=20) as client:
# Remove None-parameters
params = {
k: v
Expand Down
2 changes: 1 addition & 1 deletion geocoder_api/routers/healthcheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@


def photon_healthcheck() -> (bool, str):
with Client() as client:
with Client(timeout=20) as client:
params = {"q": "berlin"}
res = client.get(f"{settings.photon_url}/api", params=params)
if res.status_code == 200:
Expand Down