Skip to content

Commit

Permalink
Refactoring: Remove unnecessary conditions
Browse files Browse the repository at this point in the history
All chunk classes which inherit Chunk have enqueued! method.
  • Loading branch information
abicky committed Oct 16, 2017
1 parent 86eaa2c commit e845897
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/fluent/plugin/buffer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ def enqueue_chunk(metadata)
else
@queue << chunk
@queued_num[metadata] = @queued_num.fetch(metadata, 0) + 1
chunk.enqueued! if chunk.respond_to?(:enqueued!)
chunk.enqueued!
end
end
bytesize = chunk.bytesize
Expand All @@ -340,7 +340,7 @@ def enqueue_unstaged_chunk(chunk)
metadata = chunk.metadata
@queue << chunk
@queued_num[metadata] = @queued_num.fetch(metadata, 0) + 1
chunk.enqueued! if chunk.respond_to?(:enqueued!)
chunk.enqueued!
end
@queue_size += chunk.bytesize
end
Expand Down

0 comments on commit e845897

Please sign in to comment.