lib/filewatch/read_mode/handlers/base.rb in logstash-input-file-4.1.2 vs lib/filewatch/read_mode/handlers/base.rb in logstash-input-file-4.1.3
- old
+ new
@@ -5,13 +5,18 @@
class Base
include LogStash::Util::Loggable
attr_reader :sincedb_collection
- def initialize(sincedb_collection, observer, settings)
+ def initialize(processor, sincedb_collection, observer, settings)
@settings = settings
+ @processor = processor
@sincedb_collection = sincedb_collection
@observer = observer
+ end
+
+ def quit?
+ @processor.watch.quit?
end
def handle(watched_file)
logger.debug("handling: #{watched_file.path}")
unless watched_file.has_listener?