|
|
|
@ -31,7 +31,7 @@ def get_aeros_session(base_url):
|
|
|
|
global _aeros_session
|
|
|
|
global _aeros_session
|
|
|
|
|
|
|
|
|
|
|
|
if not USE_LICENSE_APP or not HAS_LICAEROS:
|
|
|
|
if not USE_LICENSE_APP or not HAS_LICAEROS:
|
|
|
|
if _aeros_session is None or not isinstance(_aeros_session, httpx.Client):
|
|
|
|
if _aeros_session is None or not isinstance(_aeros_session, httpx.Client) or str(_aeros_session.base_url) != str(base_url):
|
|
|
|
log.info(f"Using direct httpx.Client for base URL: {base_url}")
|
|
|
|
log.info(f"Using direct httpx.Client for base URL: {base_url}")
|
|
|
|
_aeros_session = httpx.Client(base_url=base_url, timeout=300.0)
|
|
|
|
_aeros_session = httpx.Client(base_url=base_url, timeout=300.0)
|
|
|
|
return _aeros_session
|
|
|
|
return _aeros_session
|
|
|
|
@ -103,8 +103,8 @@ async def aeros_post(path: str, json=None, data=None, **kwargs):
|
|
|
|
return response
|
|
|
|
return response
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
async def aeros_file_upload(path, file, field_name, filename):
|
|
|
|
async def aeros_file_upload(path, file, field_name, filename, base_url=None):
|
|
|
|
target_base_url = WINDOWS_AEROS_BASE_URL if USE_LICENSE_APP and HAS_LICAEROS else AEROS_BASE_URL
|
|
|
|
target_base_url = WINDOWS_AEROS_BASE_URL if USE_LICENSE_APP and HAS_LICAEROS else (base_url or AEROS_BASE_URL)
|
|
|
|
session = get_aeros_session(target_base_url)
|
|
|
|
session = get_aeros_session(target_base_url)
|
|
|
|
|
|
|
|
|
|
|
|
if USE_LICENSE_APP and HAS_LICAEROS:
|
|
|
|
if USE_LICENSE_APP and HAS_LICAEROS:
|
|
|
|
|