AnalyzeHealthcareEntitiesLROPoller Classe
- Héritage
-
azure.core.polling._poller.LROPollerAnalyzeHealthcareEntitiesLROPoller
Constructeur
AnalyzeHealthcareEntitiesLROPoller(client: Any, initial_response: Any, deserialization_callback: Callable[[Any], PollingReturnType_co], polling_method: PollingMethod[PollingReturnType_co])
Paramètres
Nom | Description |
---|---|
client
Obligatoire
|
|
initial_response
Obligatoire
|
|
deserialization_callback
Obligatoire
|
|
polling_method
Obligatoire
|
|
Méthodes
add_done_callback |
Ajoutez la fonction de rappel à exécuter une fois l’opération de longue durée terminée, quelle que soit la status de l’opération. |
cancel |
Annulez l’opération en cours d’interrogation. |
continuation_token |
Retourne un jeton de continuation qui permet de redémarrer l’polleur ultérieurement. |
done |
Vérifiez status de l’opération de longue durée. |
polling_method |
Retourne la méthode d’interrogation associée à cet polleur. |
remove_done_callback |
Supprimez un rappel de l’opération de longue durée. |
result |
Retourne le résultat de l’opération de longue durée, ou le résultat disponible après le délai d’expiration spécifié. |
status |
Retourne la chaîne status actuelle. |
wait |
Attendez l’opération de longue durée pendant une durée spécifiée. Vous pouvez case activée si cet appel se termine par un délai d’expiration avec la méthode « done() ». |
add_done_callback
Ajoutez la fonction de rappel à exécuter une fois l’opération de longue durée terminée, quelle que soit la status de l’opération.
add_done_callback(func: Callable) -> None
Paramètres
Nom | Description |
---|---|
func
Obligatoire
|
Fonction de rappel qui prend au moins un argument, un LongRunningOperation terminé. |
cancel
Annulez l’opération en cours d’interrogation.
cancel(**kwargs: Any) -> LROPoller[None]
Paramètres de mot clé uniquement
Nom | Description |
---|---|
polling_interval
|
Intervalle d’interrogation à utiliser pour interroger l’annulation status. La valeur par défaut est de 5 secondes. |
Retours
Type | Description |
---|---|
Retourne une instance d’un LROPoller qui renvoie None. |
Exceptions
Type | Description |
---|---|
Lorsque l’opération a déjà atteint un état terminal. |
Exemples
Annuler une opération d’intégrité existante.
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
Retourne un jeton de continuation qui permet de redémarrer l’polleur ultérieurement.
continuation_token() -> str
Retours
Type | Description |
---|---|
Jeton de continuation opaque |
done
Vérifiez status de l’opération de longue durée.
done() -> bool
Retours
Type | Description |
---|---|
« True » si le processus est terminé, sinon « False ». |
polling_method
Retourne la méthode d’interrogation associée à cet polleur.
polling_method() -> AnalyzeHealthcareEntitiesLROPollingMethod
Retours
Type | Description |
---|---|
<xref:AnalyzeHealthcareEntitiesLROPollingMethod>
|
AnalyzeHealthcareEntitiesLROPollingMethod |
remove_done_callback
Supprimez un rappel de l’opération de longue durée.
remove_done_callback(func: Callable) -> None
Paramètres
Nom | Description |
---|---|
func
Obligatoire
|
Fonction à supprimer des rappels. |
Exceptions
Type | Description |
---|---|
si l’opération de longue durée est déjà terminée. |
result
Retourne le résultat de l’opération de longue durée, ou le résultat disponible après le délai d’expiration spécifié.
result(timeout: float | None = None) -> PollingReturnType_co
Paramètres
Nom | Description |
---|---|
timeout
|
Période d’attente avant de reprendre le contrôle. valeur par défaut: None
|
Retours
Type | Description |
---|---|
any,
|
Ressource désérialisée de l’opération de longue durée, le cas échéant. |
Exceptions
Type | Description |
---|---|
Problème de serveur avec la requête. |
status
Retourne la chaîne status actuelle.
status() -> str
Retours
Type | Description |
---|---|
Chaîne status actuelle |
wait
Attendez l’opération de longue durée pendant une durée spécifiée. Vous pouvez case activée si cet appel se termine par un délai d’expiration avec la méthode « done() ».
wait(timeout: float | None = None) -> None
Paramètres
Nom | Description |
---|---|
timeout
Obligatoire
|
Délai d’attente de la fin de l’opération de longue durée (en secondes). |
Exceptions
Type | Description |
---|---|
Problème de serveur avec la requête. |
Attributs
details
Azure SDK for Python
Commentaires
https://aka.ms/ContentUserFeedback.
Bientôt disponible : Tout au long de 2024, nous allons supprimer progressivement GitHub Issues comme mécanisme de commentaires pour le contenu et le remplacer par un nouveau système de commentaires. Pour plus d’informations, consultezEnvoyer et afficher des commentaires pour