|
|
|
|
@ -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()
|
|
|
|
|
|