AnalyzeHealthcareEntitiesLROPoller クラス

継承
azure.core.polling._poller.LROPoller
AnalyzeHealthcareEntitiesLROPoller

コンストラクター

AnalyzeHealthcareEntitiesLROPoller(client: Any, initial_response: Any, deserialization_callback: Callable[[Any], PollingReturnType_co], polling_method: PollingMethod[PollingReturnType_co])

パラメーター

名前 説明
client
必須
initial_response
必須
deserialization_callback
必須
polling_method
必須

メソッド

add_done_callback

操作の状態に関係なく、実行時間の長い操作が完了したら実行するコールバック関数を追加します。

cancel

現在ポーリング中の操作を取り消します。

continuation_token

ポーリングを後で再起動できる継続トークンを返します。

done

実行時間の長い操作の状態を確認します。

polling_method

このポーリング に関連付けられているポーリング メソッドを返します。

remove_done_callback

実行時間の長い操作からコールバックを削除します。

result

実行時間の長い操作の結果、または指定したタイムアウト後に使用可能な結果を返します。

status

現在の状態文字列を返します。

wait

指定した時間、実行時間の長い操作を待機します。 この呼び出しがタイムアウトで終了した場合は、"done()" メソッドを使用してチェックできます。

add_done_callback

操作の状態に関係なく、実行時間の長い操作が完了したら実行するコールバック関数を追加します。

add_done_callback(func: Callable) -> None

パラメーター

名前 説明
func
必須

少なくとも 1 つの引数 (完了した LongRunningOperation) を受け取るコールバック関数。

cancel

現在ポーリング中の操作を取り消します。

cancel(**kwargs: Any) -> LROPoller[None]

キーワードのみのパラメーター

名前 説明
polling_interval
int

取り消し状態のポーリングに使用するポーリング間隔。 既定値は 5 秒です。

戻り値

説明

None を返す LROPoller のインスタンスを返します。

例外

説明

操作が既に終了状態に達した場合。

既存の正常性操作を取り消します。


   import os
   from azure.core.exceptions import HttpResponseError
   from azure.core.credentials import AzureKeyCredential
   from azure.ai.textanalytics import TextAnalyticsClient

   endpoint = os.environ["AZURE_LANGUAGE_ENDPOINT"]
   key = os.environ["AZURE_LANGUAGE_KEY"]

   text_analytics_client = TextAnalyticsClient(
       endpoint=endpoint,
       credential=AzureKeyCredential(key),
   )

   documents = [
       "RECORD #333582770390100 | MH | 85986313 | | 054351 | 2/14/2001 12:00:00 AM | \
       CORONARY ARTERY DISEASE | Signed | DIS | Admission Date: 5/22/2001 \
       Report Status: Signed Discharge Date: 4/24/2001 ADMISSION DIAGNOSIS: \
       CORONARY ARTERY DISEASE. HISTORY OF PRESENT ILLNESS: \
       The patient is a 54-year-old gentleman with a history of progressive angina over the past several months. \
       The patient had a cardiac catheterization in July of this year revealing total occlusion of the RCA and \
       50% left main disease , with a strong family history of coronary artery disease with a brother dying at \
       the age of 52 from a myocardial infarction and another brother who is status post coronary artery bypass grafting. \
       The patient had a stress echocardiogram done on July , 2001 , which showed no wall motion abnormalities ,\
       but this was a difficult study due to body habitus. The patient went for six minutes with minimal ST depressions \
       in the anterior lateral leads , thought due to fatigue and wrist pain , his anginal equivalent. Due to the patient's \
       increased symptoms and family history and history left main disease with total occasional of his RCA was referred \
       for revascularization with open heart surgery."
   ]

   poller = text_analytics_client.begin_analyze_healthcare_entities(documents)

   try:
       poller.cancel()
   except HttpResponseError as e:
       # If the operation has already reached a terminal state it cannot be cancelled.
       print(e)

   else:
       print("Healthcare entities analysis was successfully cancelled.")


continuation_token

ポーリングを後で再起動できる継続トークンを返します。

continuation_token() -> str

戻り値

説明
str

不透明な継続トークン

done

実行時間の長い操作の状態を確認します。

done() -> bool

戻り値

説明

プロセスが完了した場合は 'True'、それ以外の場合は 'False' です。

polling_method

このポーリング に関連付けられているポーリング メソッドを返します。

polling_method() -> AnalyzeHealthcareEntitiesLROPollingMethod

戻り値

説明
<xref:AnalyzeHealthcareEntitiesLROPollingMethod>

AnalyzeHealthcareEntitiesLROPollingMethod

remove_done_callback

実行時間の長い操作からコールバックを削除します。

remove_done_callback(func: Callable) -> None

パラメーター

名前 説明
func
必須

コールバックから削除される関数。

例外

説明

実行時間の長い操作が既に完了している場合は 。

result

実行時間の長い操作の結果、または指定したタイムアウト後に使用可能な結果を返します。

result(timeout: float | None = None) -> PollingReturnType_co

パラメーター

名前 説明
timeout

制御を取り戻す前に待機する期間。

既定値: None

戻り値

説明
any,

実行時間の長い操作の逆シリアル化されたリソース (使用可能な場合)。

例外

説明

クエリに関するサーバーの問題。

status

現在の状態文字列を返します。

status() -> str

戻り値

説明
str

現在の状態文字列

wait

指定した時間、実行時間の長い操作を待機します。 この呼び出しがタイムアウトで終了した場合は、"done()" メソッドを使用してチェックできます。

wait(timeout: float | None = None) -> None

パラメーター

名前 説明
timeout
必須

実行時間の長い操作が完了するまで待機する期間 (秒単位)。

例外

説明

クエリに関するサーバーの問題。

属性

details

実行時間の長い操作メタデータ。

戻り値

説明

実行時間の長い操作に関する詳細のマッピング。