health_check#
Wrapper over the health check gRPC service of CFX.
Classes:
|
Wraps the health check gRPC service of CFX. |
- class ansys.cfx.core.services.health_check.HealthCheckService(channel: Channel, metadata: list[tuple[str, str]], cfx_error_state)#
Bases:
objectWraps the health check gRPC service of CFX.
Methods
check_health()
Check the health of the CFX connection.
Classes:
Status(*values)Health check status.
Methods:
__init__(channel, metadata, cfx_error_state)Initialize an instance of the
HealthCheckServiceclass.Check the health of the CFX connection.
status()Get the health status of the CFX connection.
wait_for_server(timeout)Keep a watch on the health of the CFX connection.
Attributes:
Flag indicating if CFX is serving.
- __init__(channel: Channel, metadata: list[tuple[str, str]], cfx_error_state) None#
Initialize an instance of the
HealthCheckServiceclass.
- wait_for_server(timeout: int) None#
Keep a watch on the health of the CFX connection.
Response changes only when the service’s serving status changes.
- Parameters:
- timeout
int Timeout in seconds.
- timeout
- Raises:
TimeoutErrorIf the connection to the CFX server could not be established within the timeout.