Skip to content

Commit

Permalink
Shorten
Browse files Browse the repository at this point in the history
  • Loading branch information
piroor committed Apr 21, 2015
1 parent ff49479 commit 9d67663
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions lib/droonga/forward_buffer.rb
Expand Up @@ -87,8 +87,10 @@ def forward(buffered_message_path)
buffered_message = @unpacker.read
@unpacker.reset

message = buffered_message["message"]
destination = buffered_message["destination"]

if @process_messages_newer_than_timestamp
message = buffered_message["message"]
message_timestamp = Time.parse(message["date"])
logger.trace("Checking boundary of obsolete message",
:newer_than => @process_messages_newer_than_timestamp,
Expand All @@ -103,10 +105,9 @@ def forward(buffered_message_path)

if buffered_message
logger.trace("forward: Forwarding buffered message",
:message => buffered_message["message"],
:destination => buffered_message["destination"])
on_forward(buffered_message["message"],
buffered_message["destination"])
:message => message,
:destination => destination)
on_forward(message, destination)
end

FileUtils.rm_f(buffered_message_path.to_s)
Expand Down

0 comments on commit 9d67663

Please sign in to comment.