AnalyzeHealthcareEntitiesLROPoller 클래스
- 상속
-
azure.core.polling._poller.LROPollerAnalyzeHealthcareEntitiesLROPoller
생성자
AnalyzeHealthcareEntitiesLROPoller(client: Any, initial_response: Any, deserialization_callback: Callable[[Any], PollingReturnType_co], polling_method: PollingMethod[PollingReturnType_co])
매개 변수
Name | Description |
---|---|
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
매개 변수
Name | Description |
---|---|
func
필수
|
하나 이상의 인수인 완료된 LongRunningOperation을 사용하는 콜백 함수입니다. |
cancel
현재 폴링 중인 작업을 취소합니다.
cancel(**kwargs: Any) -> LROPoller[None]
키워드 전용 매개 변수
Name | Description |
---|---|
polling_interval
|
취소 상태 폴링하는 데 사용할 폴링 간격입니다. 기본값은 5 초입니다. |
반환
형식 | Description |
---|---|
None을 반환하는 LROPoller의 instance 반환합니다. |
예외
형식 | Description |
---|---|
작업이 이미 터미널 상태에 도달한 경우 |
예제
기존 상태 작업을 취소합니다.
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
done
polling_method
이 폴러에 연결된 폴링 메서드를 반환합니다.
polling_method() -> AnalyzeHealthcareEntitiesLROPollingMethod
반환
형식 | Description |
---|---|
<xref:AnalyzeHealthcareEntitiesLROPollingMethod>
|
AnalyzeHealthcareEntitiesLROPollingMethod |
remove_done_callback
장기 실행 작업에서 콜백을 제거합니다.
remove_done_callback(func: Callable) -> None
매개 변수
Name | Description |
---|---|
func
필수
|
콜백에서 제거할 함수입니다. |
예외
형식 | Description |
---|---|
장기 실행 작업이 이미 완료된 경우 입니다. |
result
장기 실행 작업의 결과 또는 지정된 시간 제한 후에 사용할 수 있는 결과를 반환합니다.
result(timeout: float | None = None) -> PollingReturnType_co
매개 변수
Name | Description |
---|---|
timeout
|
제어를 다시 가져오기 전에 대기하는 기간입니다. 기본값: None
|
반환
형식 | Description |
---|---|
any,
|
장기 실행 작업의 역직렬화된 리소스(사용 가능한 경우)입니다. |
예외
형식 | Description |
---|---|
쿼리에 대한 서버 문제입니다. |
status
wait
지정된 시간 동안 장기 실행 작업을 기다립니다. 이 호출이 "done()" 메서드를 사용하여 시간 제한으로 종료된 경우 검사 수 있습니다.
wait(timeout: float | None = None) -> None
매개 변수
Name | Description |
---|---|
timeout
필수
|
장기 실행 작업이 완료되기를 기다리는 기간(초)입니다. |
예외
형식 | Description |
---|---|
쿼리에 대한 서버 문제입니다. |
특성
details
Azure SDK for Python