class FileWatch::TailMode::Handlers::Create
Public Instance Methods
handle_specifically(watched_file)
click to toggle source
# File lib/filewatch/tail_mode/handlers/create.rb, line 5 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
update_existing_specifically(watched_file, sincedb_value)
click to toggle source
# File lib/filewatch/tail_mode/handlers/create.rb, line 11 def update_existing_specifically(watched_file, sincedb_value) # sincedb_value is the source of truth watched_file.update_bytes_read(sincedb_value.position) end