Skip to content

Commit

Permalink
remove duplicate describe_progress method
Browse files Browse the repository at this point in the history
  • Loading branch information
emiltin committed Jan 7, 2025
1 parent 9774f8a commit 4f33320
Showing 1 changed file with 6 additions and 15 deletions.
21 changes: 6 additions & 15 deletions lib/rsmp/collect/collector.rb
Original file line number Diff line number Diff line change
Expand Up @@ -156,15 +156,6 @@ def start &block
@distributor.add_receiver self if @distributor
end

# Build a string describing how how progress reached before timeout
def describe_progress
str = "#{identifier}: #{@title.capitalize} collection "
str << "in response to #{@m_id} " if @m_id
str << "didn't complete within #{@timeout}s, "
str << "reached #{@messages.size}/#{@num}"
str
end

# Check if we receive a NotAck related to initiating request, identified by @m_id.
def reject_not_ack message
return unless @m_id
Expand Down Expand Up @@ -307,13 +298,13 @@ def describe_matcher
end
end

# return a string that describe how many many messages have been collected
# Build a string describing how how progress reached before timeout
def describe_progress
if @num
"#{@messages.size} of #{@num} message#{'s' if @messages.size!=1} collected"
else
"#{@messages.size} message#{'s' if @messages.size!=1} collected"
end
str = "#{@title.capitalize} #{identifier} "
str << "in response to #{@m_id} " if @m_id
str << "timed out after #{@timeout}s, "
str << "reaching #{@messages.size}/#{@num}"
str
end

# log when we start collecting
Expand Down

0 comments on commit 4f33320

Please sign in to comment.