eventmachine-tail 0.1.2781 → 0.1.2788
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/em/filetail.rb +2 -2
- metadata +1 -1
data/lib/em/filetail.rb
CHANGED
@@ -22,7 +22,7 @@ class EventMachine::FileTail
|
|
22
22
|
open
|
23
23
|
|
24
24
|
@fstat = File.stat(@path)
|
25
|
-
@file.
|
25
|
+
@file.sysseek(0, IO::SEEK_END)
|
26
26
|
watch
|
27
27
|
end # def initialize
|
28
28
|
|
@@ -101,7 +101,7 @@ class EventMachine::FileTail
|
|
101
101
|
open # Reopen if the filesystem device changed
|
102
102
|
elsif (fstat.size < @fstat.size)
|
103
103
|
@logger.info("File likely truncated... #{path}")
|
104
|
-
@file.
|
104
|
+
@file.sysseek(0, IO::SEEK_SET)
|
105
105
|
schedule_next_read
|
106
106
|
end
|
107
107
|
@fstat = fstat
|