File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1755,14 +1755,13 @@ def get_cluster_service_info(cluster: Dict[str, Any]) -> List[str]:
17551755 for m in cluster ['members' ]:
17561756 if 'latest_end_lsn' in m and 'lag_to_primary' in m :
17571757 r .update (m )
1758- if r ['latest_end_lsn' ] and r [ 'lag_to_primary' ] :
1758+ if r ['latest_end_lsn' ]:
17591759 lag_to_primary = r ['lag_to_primary' ]
17601760 lag_to_primary = round (lag_to_primary / 1024 / 1024 ) if isinstance (lag_to_primary , int ) \
17611761 else lag_to_primary
1762- if r ['latest_end_lsn' ] and lag_to_primary :
1763- info = (f"The latest known LSN of the primary instance is { r ['latest_end_lsn' ]} , "
1764- f"the replication lag is { lag_to_primary } MB" )
1765- service_info .append (info )
1762+ info = (f"The latest known LSN of the primary instance is { r ['latest_end_lsn' ]} , "
1763+ f"the replication lag is { lag_to_primary } MB" )
1764+ service_info .append (info )
17661765
17671766 if cluster .get ('pause' ):
17681767 service_info .append ('Maintenance mode: on' )
You can’t perform that action at this time.
0 commit comments