LROPoller Class
Poller for long running operations.
- Inheritance
-
builtins.objectLROPoller
Constructor
LROPoller(client: Any, initial_response: Union[ClientRawResponse, requests.Response], deserialization_callback: Union[Model, Callable[[requests.Response], Model]], polling_method: PollingMethod)
Parameters
- client
- ServiceClient
A msrest service client. Can be a SDK client and it will be casted to a ServiceClient.
A callback that takes a Response and return a deserialized object. If a subclass of Model is given, this passes "deserialize" as callback.
Methods
| add_done_callback |
Add callback function to be run once the long running operation has completed - regardless of the status of the operation. |
| 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
- func
- callable
Callback function that takes at least one argument, a completed LongRunningOperation.
done
Check status of the long running operation.
done() -> bool
Returns
'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
Exceptions
result
Return the result of the long running operation, or the result available after the specified timeout.
result(timeout: Optional[float] = None) -> msrest.serialization.Model
Parameters
- timeout
Returns
The deserialized resource of the long running operation, if one is available.
Exceptions
Server problem with the query.
status
Returns the current status string.
status() -> str
Returns
The current status string
Return type
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: Optional[float] = None) -> None
Parameters
- timeout
- float
Period of time to wait for the long running operation to complete (in seconds).
Exceptions
Server problem with the query.
Feedback
Submit and view feedback for