florist.api.routes.server.status module

FastAPI routes for checking server status.

check_status(server_uuid, redis_host, redis_port)[source]

Retrieve value at key server_uuid in redis if it exists.

Parameters:
  • server_uuid (str) – (str) the uuid of the server to fetch from redis.

  • redis_host (str) – (str) the host name for the Redis instance for metrics reporting.

  • redis_port (str) – (str) the port for the Redis instance for metrics reporting.

Return type:

JSONResponse

Returns:

(JSONResponse) If successful, returns 200 with JSON containing the val at server_uuid. If not successful, returns the appropriate error code with a JSON with the format below:

{“error”: <error message>}