Skip to content

Commit

Permalink
this module initialize will be never called
Browse files Browse the repository at this point in the history
Signed-off-by: Yuta Iwama <ganmacs@gmail.com>
  • Loading branch information
ganmacs committed Aug 16, 2019
1 parent 53a1e76 commit 829b3aa
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions lib/fluent/plugin/out_file.rb
Original file line number Diff line number Diff line change
Expand Up @@ -72,16 +72,14 @@ class FileOutput < Output
attr_accessor :last_written_path # for tests

module SymlinkBufferMixin
def initialize
super
@latest_metadata = Metadata.new(0, nil, nil)
end

def metadata(timekey: nil, tag: nil, variables: nil)
metadata = super
if metadata.timekey && (metadata.timekey > @latest_metadata.timekey)

@latest_metadata ||= new_metadata(timekey: 0)
if metadata.timekey && (metadata.timekey >= @latest_metadata.timekey)
@latest_metadata = metadata
end

metadata
end

Expand Down

0 comments on commit 829b3aa

Please sign in to comment.