Navigation Menu

Skip to content

Commit

Permalink
Remove needless "else" block
Browse files Browse the repository at this point in the history
  • Loading branch information
piroor committed Apr 22, 2015
1 parent 3923434 commit 7e84a83
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/droonga/forward_buffer.rb
Expand Up @@ -73,6 +73,10 @@ def start_forward
@process_messages_newer_than_timestamp
logger.info("#{n_forwarded_messages} new messages forwarded. " +
"The boundary is now cleared.")
# Don't clear the boundary while forwarding.
# Because buffered messages are not sorted by their "date",
# so older messages can appear after newer one.
# (ex. messages generated by Dispatcher)
@process_messages_newer_than_timestamp = nil
end
@serf.reset_have_unprocessed_messages_for(@target)
Expand Down Expand Up @@ -111,10 +115,6 @@ def forward(buffered_message_path)
:message_at => message_timestamp)
if @process_messages_newer_than_timestamp >= message_timestamp
buffered_message = nil
else
logger.info("New message is detected.")
# Don't clear the boundary for now, because older messages
# forwarded by the dispatcher can be still buffered.
end
end

Expand Down

0 comments on commit 7e84a83

Please sign in to comment.