From 514102d902f05714387bcd8ff774b54e4ea3861e Mon Sep 17 00:00:00 2001 From: JulienPeloton Date: Tue, 4 Jun 2024 12:40:16 +0200 Subject: [PATCH] Closes #195 --- fink_client/consumer.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fink_client/consumer.py b/fink_client/consumer.py index 152098e..b235492 100644 --- a/fink_client/consumer.py +++ b/fink_client/consumer.py @@ -371,21 +371,21 @@ def return_offsets( offset = "%d" % (partition.offset) if hi < 0: - lag = "no hwmark" # Unlikely + lag = 0 # Unlikely elif partition.offset < 0: # No committed offset, show total message count as lag. # The actual message count may be lower due to compaction # and record deletions. - lag = "%d" % (hi - lo) + lag = hi - lo partition.offset = 0 else: - lag = "%d" % (hi - partition.offset) + lag = hi - partition.offset # total_offsets = total_offsets + partition.offset total_lag = total_lag + int(lag) if verbose: - if (hide_empty_partition and offset != "-") or (not hide_empty_partition): + if (hide_empty_partition and (offset != "-" or int(lag) > 0)) or (not hide_empty_partition): print( "%-50s %9s %9s" % (