diff --git a/poetry.lock b/poetry.lock index c0a28c7..d7feb42 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 2.1.1 and should not be changed by hand. +# This file is automatically @generated by Poetry 2.1.3 and should not be changed by hand. [[package]] name = "annotated-types" @@ -291,6 +291,20 @@ idna = ["idna (>=3.7)"] trio = ["trio (>=0.23)"] wmi = ["wmi (>=1.5.1)"] +[[package]] +name = "dotenv" +version = "0.9.9" +description = "Deprecated package" +optional = false +python-versions = "*" +groups = ["main"] +files = [ + {file = "dotenv-0.9.9-py2.py3-none-any.whl", hash = "sha256:29cf74a087b31dafdb5a446b6d7e11cbce8ed2741540e2339c69fbef92c94ce9"}, +] + +[package.dependencies] +python-dotenv = "*" + [[package]] name = "email-validator" version = "2.2.0" @@ -2051,4 +2065,4 @@ files = [ [metadata] lock-version = "2.1" python-versions = "^3.11" -content-hash = "dce48738423bd996d6e51e639ac38bf8f3c5e5ad4baef51fdf06bd049cf15e00" +content-hash = "47699b3d49d0014f8e97307d48d50b684755a53f62120ec9be634937d5389ab0" diff --git a/pyproject.toml b/pyproject.toml index c02b676..251c33c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -27,6 +27,7 @@ pandas = "^2.2.3" psycopg2-binary = "^2.9.10" greenlet = "^3.1.1" isort = "^6.0.1" +dotenv = "^0.9.9" [build-system] diff --git a/src/aeros_project/service.py b/src/aeros_project/service.py index 062a0b6..b320ec5 100644 --- a/src/aeros_project/service.py +++ b/src/aeros_project/service.py @@ -9,7 +9,7 @@ from sqlalchemy.orm import selectinload from src.aeros_equipment.service import save_default_equipment from src.aeros_simulation.service import save_default_simulation_node from src.auth.service import CurrentUser -from src.config import AEROS_BASE_URL +from src.config import WINDOWS_AEROS_BASE_URL from src.database.core import DbSession from src.database.service import search_filter_sort_paginate @@ -22,7 +22,9 @@ client = httpx.AsyncClient(timeout=300.0) async def import_aro_project(*, db_session: DbSession, aeros_project_in: AerosProjectInput): - windows_aeros_base_url = os.getenv("WINDOWS_AEROS_BASE_URL", "http://localhost:8800") + # windows_aeros_base_url = WINDOWS_AEROS_BASE_URL + + print(WINDOWS_AEROS_BASE_URL) file = aeros_project_in.aro_file # Get filename @@ -67,7 +69,7 @@ async def import_aro_project(*, db_session: DbSession, aeros_project_in: AerosPr } response = await client.post( - f"http://192.168.1.87:8800/api/aeros/upload-file", + f"{WINDOWS_AEROS_BASE_URL}/api/aeros/upload-file", files=files ) response.raise_for_status() diff --git a/src/config.py b/src/config.py index b746ee4..df1ac43 100644 --- a/src/config.py +++ b/src/config.py @@ -75,3 +75,4 @@ MAXIMO_API_KEY = config("MAXIMO_API_KEY", default="keys") AUTH_SERVICE_API = config("AUTH_SERVICE_API", default="http://192.168.1.82:8000/auth") AEROS_BASE_URL = config("AEROS_BASE_URL", default="http://20.198.228.3") +WINDOWS_AEROS_BASE_URL = config("WINDOWS_AEROS_BASE_URL", default="http://localhost:8800")