lib/dexter/processor.rb in pgdexter-0.1.6 vs lib/dexter/processor.rb in pgdexter-0.2.0

- old
+ new

@@ -1,15 +1,15 @@ module Dexter class Processor include Logging - def initialize(database_url, logfile, options) + def initialize(logfile, options) @logfile = logfile @collector = Collector.new(min_time: options[:min_time]) @log_parser = LogParser.new(logfile, @collector) - @indexer = Indexer.new(database_url, options) + @indexer = Indexer.new(options) @starting_interval = 3 @interval = options[:interval] @mutex = Mutex.new @@ -32,10 +32,14 @@ sleep(@interval) end end end - @log_parser.perform + begin + @log_parser.perform + rescue Errno::ENOENT => e + abort e.message + end process_queries end private