Skip to content

Commit a501a3c

Browse files
author
Chien Yuan Chang
committed
test with sdk fix
1 parent 0ba941f commit a501a3c

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

  • sdk/contentunderstanding/azure-ai-contentunderstanding/azure/ai/contentunderstanding

sdk/contentunderstanding/azure-ai-contentunderstanding/azure/ai/contentunderstanding/aio/models/_patch.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,13 @@ def operation_id(self) -> str:
5959
except (KeyError, ValueError) as e:
6060
raise ValueError(f"Could not extract operation ID: {str(e)}") from e
6161

62+
async def update_status(self) -> None:
63+
"""Update the status of the LRO.
64+
"""
65+
if self.status().lower() in {"succeeded", "failed", "canceled"}:
66+
return
67+
await self._polling_method.update_status() # type: ignore
68+
6269
@classmethod
6370
async def from_continuation_token( # type: ignore[override] # pylint: disable=invalid-overridden-method
6471
cls,

sdk/contentunderstanding/azure-ai-contentunderstanding/azure/ai/contentunderstanding/models/_patch.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,13 @@ def operation_id(self) -> str:
9090
except (KeyError, ValueError) as e:
9191
raise ValueError(f"Could not extract operation ID: {str(e)}") from e
9292

93+
def update_status(self) -> None:
94+
"""Update the status of the LRO.
95+
"""
96+
if self.status().lower() in {"succeeded", "failed", "canceled"}:
97+
return
98+
self._polling_method.update_status() # type: ignore
99+
93100
@classmethod
94101
def from_continuation_token(
95102
cls, polling_method: PollingMethod[PollingReturnType_co], continuation_token: str, **kwargs: Any

0 commit comments

Comments
 (0)