SmartSpectra C++ SDK
Measure human vitals from video with SmartSpectra C++ SDK.
Loading...
Searching...
No Matches
Health and Readiness Endpoints Tutorial

This tutorial covers the three new health and readiness endpoints available in the Physiology service. These endpoints help ensure that the service is operational and ready to handle requests.

Endpoints Overview

  1. IsPhysiologyCoreUp: Checks if the Physiology Core service is running.
  2. IsEdgeGraphRunning: Checks if the Edge Graph is currently running.
  3. CheckHealth: Provides a general health check of the service.

Usage in Code

These endpoints are used in the App.run method of the full_example_on_prem_client.py file.

Each of these methods returns a status that can be used to determine the readiness of the service components.

Example

Here is an example of how these endpoints can used in your custom client:

# Check if Physiology Core is up
core_status_response = await self.physiology_client.IsPhysiologyCoreUp(empty.Empty())
print(f'Physiology Core is up: {core_status_response.value}')
# Check if Edge Graph is running
graph_status_response = await self.physiology_client.IsEdgeGraphRunning(empty.Empty())
print(f'Edge Graph is running: {graph_status_response.value}')
# General health check
health_check_response = await self.physiology_client.CheckHealth(empty.Empty())
print(f'Health check response: {health_check_response.value}')

You can use these to check the logic of the SmartSpectra OnPrem SDK Physiology Service. For more details on the Core and Edge components and their relationship, see Architecture.