Sha256: c123700b663139cf3d5caa67e66d7477f3eb09c49989e9514bbbf9b84c8f0948

Contents?: true

Size: 497 Bytes

Versions: 29

Compression:

Stored size: 497 Bytes

Contents

# encoding: utf-8

module FileWatch module TailMode module Handlers
  class Create < Base
    def handle_specifically(watched_file)
      if open_file(watched_file)
        add_or_update_sincedb_collection(watched_file) unless sincedb_collection.member?(watched_file.sincedb_key)
      end
    end

    def update_existing_specifically(watched_file, sincedb_value)
      # sincedb_value is the source of truth
      watched_file.update_bytes_read(sincedb_value.position)
    end
  end
end end end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
logstash-input-file-4.4.6 lib/filewatch/tail_mode/handlers/create.rb
logstash-input-file-4.4.5 lib/filewatch/tail_mode/handlers/create.rb
logstash-input-file-4.4.4 lib/filewatch/tail_mode/handlers/create.rb
logstash-input-file-4.4.3 lib/filewatch/tail_mode/handlers/create.rb
logstash-input-file-4.4.2 lib/filewatch/tail_mode/handlers/create.rb
logstash-input-file-4.4.1 lib/filewatch/tail_mode/handlers/create.rb
logstash-input-file-4.4.0 lib/filewatch/tail_mode/handlers/create.rb
logstash-input-file-4.3.1 lib/filewatch/tail_mode/handlers/create.rb
logstash-input-file-4.3.0 lib/filewatch/tail_mode/handlers/create.rb
logstash-input-file-4.2.4 lib/filewatch/tail_mode/handlers/create.rb
logstash-input-file-4.2.3 lib/filewatch/tail_mode/handlers/create.rb
logstash-input-file-4.2.2 lib/filewatch/tail_mode/handlers/create.rb
logstash-input-file-4.2.1 lib/filewatch/tail_mode/handlers/create.rb
logstash-input-file-4.2.0 lib/filewatch/tail_mode/handlers/create.rb
logstash-input-file-4.1.18 lib/filewatch/tail_mode/handlers/create.rb
logstash-input-file-4.1.17 lib/filewatch/tail_mode/handlers/create.rb
logstash-input-file-4.1.16 lib/filewatch/tail_mode/handlers/create.rb
logstash-input-file-4.1.15 lib/filewatch/tail_mode/handlers/create.rb
logstash-input-file-4.1.14 lib/filewatch/tail_mode/handlers/create.rb
logstash-input-file-4.1.13 lib/filewatch/tail_mode/handlers/create.rb