TextAnalysisLROPoller Class

Implements a protocol which returned poller objects are consistent with.

Inheritance
typing_extensions.Protocol
TextAnalysisLROPoller

Constructor

TextAnalysisLROPoller(*args, **kwargs)

Methods

add_done_callback

Add callback function to be run once the long running operation has completed - regardless of the status of the operation.

cancel

Cancel the operation currently being polled.

continuation_token

Return a continuation token that allows to restart the poller later.

done

Check status of the long running operation.

remove_done_callback

Remove a callback from the long running operation.

result

Return the result of the long running operation, or the result available after the specified timeout.

status

Returns the current status string.

wait

Wait on the long running operation for a specified length of time. You can check if this call as ended with timeout with the "done()" method.

add_done_callback

Add callback function to be run once the long running operation has completed - regardless of the status of the operation.

add_done_callback(func: Callable) -> None

Parameters

Name Description
func
Required

Callback function that takes at least one argument, a completed LongRunningOperation.

cancel

Cancel the operation currently being polled.

cancel() -> None

Returns

Type Description

None

Exceptions

Type Description

When the operation has already reached a terminal state.

continuation_token

Return a continuation token that allows to restart the poller later.

continuation_token() -> str

Returns

Type Description
str

An opaque continuation token

done

Check status of the long running operation.

done() -> bool

Returns

Type Description

'True' if the process has completed, else 'False'.

remove_done_callback

Remove a callback from the long running operation.

remove_done_callback(func: Callable) -> None

Parameters

Name Description
func
Required

The function to be removed from the callbacks.

Exceptions

Type Description

if the long running operation has already completed.

result

Return the result of the long running operation, or the result available after the specified timeout.

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

Parameters

Name Description
timeout
Default value: None

Returns

Type Description

The deserialized resource of the long running operation, if one is available.

Exceptions

Type Description

Server problem with the query.

status

Returns the current status string.

status() -> str

Returns

Type Description
str

The current status string

wait

Wait on the long running operation for a specified length of time. You can check if this call as ended with timeout with the "done()" method.

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

Parameters

Name Description
timeout

Period of time to wait for the long running operation to complete (in seconds).

Default value: None

Exceptions

Type Description

Server problem with the query.

Attributes

details

Long-running operation metadata.

Returns

Type Description

A mapping of details about the long-running operation.