Skip to content

Commit cd742ed

Browse files
Use synchronous client temporarily until we update fmu-sumo >= 2.0 (#870)
1 parent 7f6147f commit cd742ed

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

backend_py/primary/primary/services/sumo_access/_helpers.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def create_sumo_client(access_token: str) -> SumoClient:
4141
sumo_client = SumoClient(
4242
env=config.SUMO_ENV,
4343
token=access_token,
44-
http_client=FakeHTTPXClient(),
44+
http_client=None, # Until we update fmu-sumo > 2.0 we need to initialize a sync client.
4545
async_http_client=httpx_async_client.client,
4646
)
4747
timer.record_lap("create_sumo_client()")

backend_py/primary/primary/services/sumo_access/case_inspector.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ async def get_case_name_async(self) -> str:
4040
async def get_iterations_async(self) -> list[IterationInfo]:
4141
case: Case = await self._get_or_create_case_obj()
4242

43-
iterations = await case.iterations_async
43+
# Until we update fmu-sumo > 2.0 we need to fetch iterations synchronously.
44+
iterations = case.iterations
4445

4546
iter_info_arr: list[IterationInfo] = []
4647
for iteration in iterations:

0 commit comments

Comments
 (0)