Sha256: 4150961ae8dc4e66d5e07afe9ded5a96350363324761ee17c6e8406786a30ea4
Contents?: true
Size: 781 Bytes
Versions: 29
Compression:
Stored size: 781 Bytes
Contents
# encoding: utf-8 module FileWatch module TailMode module Handlers class CreateInitial < Base def handle_specifically(watched_file) if open_file(watched_file) logger.trace("handle_specifically opened file handle: #{watched_file.file.fileno}, path: #{watched_file.filename}") add_or_update_sincedb_collection(watched_file) end end def update_existing_specifically(watched_file, sincedb_value) position = watched_file.last_stat_size if @settings.start_new_files_at == :beginning position = 0 end logger.trace("update_existing_specifically - #{watched_file.path}: seeking to #{position}") watched_file.update_bytes_read(position) sincedb_value.update_position(position) end end end end end
Version data entries
29 entries across 29 versions & 1 rubygems