flip_api.trusts_services.trusts_health_check ============================================ .. py:module:: flip_api.trusts_services.trusts_health_check Attributes ---------- .. autoapisummary:: flip_api.trusts_services.trusts_health_check.router Functions --------- .. autoapisummary:: flip_api.trusts_services.trusts_health_check.check_trusts_health Module Contents --------------- .. py:data:: router .. py:function:: check_trusts_health(db: sqlmodel.Session = Depends(get_session)) -> list[flip_api.domain.interfaces.trust.ITrustHealth] :async: Retrieves health status of all trusts based on their last heartbeat timestamp. Instead of making outbound HTTP calls to each trust's /health endpoint, this checks the last_heartbeat field updated by the trust's polling service. :param db: Database session for querying trusts. :type db: Session :returns: A list of ITrustHealth objects representing the health status of each trust. :rtype: list[ITrustHealth] :raises HTTPException: If no trusts are found in the database or if there is an error during the operation.