(conn)
return rows
Return metrics about table statuses.
Return metrics about table statuses.
Return metrics about table statuses .
def get_table_status_metrics(conn):
    # type: (rethinkdb.net.Connection) -> List[tuple]
    """
    Return metrics about table statuses.
    """
    results = TABLE_STATUS.run(conn)

    rows = []  # type: List[tuple]
    for table_status in results:
        row = (
            table_status['name'],
            table_status['db'],
            len(table_status['shards']),
            table_status['status']['ready_for_outdated_reads'],
            table_status['status']['ready_for_reads'],
            table_status['status']['ready_for_writes'],
            table_status['status']['all_replicas_ready'],
        )
        rows.append(row)

    return rows
def get_table_status_metrics ( conn ) : # type: (rethinkdb.net.Connection) -> List[tuple] results = TABLE_STATUS . run ( conn ) rows = [ ] # type: List[tuple] for table_status in results : row = ( table_status [ 'name' ] , table_status [ 'db' ] , len ( table_status [ 'shards' ] ) , table_status [ 'status' ] [ 'ready_for_outdated_reads' ] , table_status [ 'status' ] [ 'ready_for_reads' ] , table_status [ 'status' ] [ 'ready_for_writes' ] , table_status [ 'status' ] [ 'all_replicas_ready' ] , ) rows . append ( row ) return rows