Sha256: 4e6fd8626a655639886d0f0e63853e1b7e3c8433332ac6223c32595f214c3fcb
Contents?: true
Size: 523 Bytes
Versions: 4
Compression:
Stored size: 523 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 position = sincedb_value.position watched_file.update_bytes_read(position) end end end end end
Version data entries
4 entries across 4 versions & 1 rubygems