Skip to content

Commit

Permalink
Closes #195
Browse files Browse the repository at this point in the history
  • Loading branch information
JulienPeloton committed Jun 4, 2024
1 parent 2a9a2e2 commit 514102d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions fink_client/consumer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
% (
Expand Down

0 comments on commit 514102d

Please sign in to comment.