Constructor
# new AsyncGRPCTask()
Task to be accomplished using asynchronous GRPC calls.
When it is time to run the task, an async GRPC call is run resulting in a FutureWrapper object.
The FutureWrapper is monitored for completion, and then an action is taken in response.
Methods
# abstract _handle_error(exception)
Override to handle any exception raised in handling GRPC result.
Parameters:
| Name | Type | Description |
|---|---|---|
exception |
Error
|
Error exception to handle. |
# abstract _handle_result(result)
Override to handle result of grpc query when it is available.
Parameters:
| Name | Type | Description |
|---|---|---|
result |
*
|
Result to handle. |
# abstract _should_query(now_sec)
Called on update() when no query is running to determine whether to start a new query.
Parameters:
| Name | Type | Description |
|---|---|---|
now_sec |
number
|
Time now in seconds. |
# abstract _start_query()
Override to start async grpc query and return future-wrapper for result.
# update() → {void}
Call this periodically to manage execution of task represented by this object
void