lib/fluent/plugin/in_systemd.rb in fluent-plugin-systemd-0.0.7 vs lib/fluent/plugin/in_systemd.rb in fluent-plugin-systemd-0.0.8

- old
+ new

@@ -33,11 +33,10 @@ end private def init_journal - sleep 0.25 @journal = Systemd::Journal.new(path: @path) # make sure initial call to wait doesn't return :invalidate # see https://github.com/ledbettj/systemd-journal/issues/70 @journal.wait(0) @journal.filter(*@filters) @@ -87,9 +86,11 @@ init_journal if @journal.wait(0) == :invalidate while @journal.move_next && @running yield @journal.current_entry @pos_writer.update(@journal.cursor) end + # prevent a loop of death + sleep 1 end end end end