Sha256: 825d4fc0ea27519feb8280ce33e3e4d347261aa3d5065bf2018364407cff3632
Contents?: true
Size: 657 Bytes
Versions: 4
Compression:
Stored size: 657 Bytes
Contents
# encoding: utf-8 module FileWatch module TailMode module Handlers class CreateInitial < Base def handle_specifically(watched_file) if open_file(watched_file) 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.debug("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
4 entries across 4 versions & 1 rubygems