tailf2kafka 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c4c3bad1a4caca5027bba89946e2a38de39bb6b7
4
- data.tar.gz: 07b8a91f46d3592384200bc07418cfc0c514615f
3
+ metadata.gz: 5f2a1d5781a37ef3c92b58c160854a06501f6f56
4
+ data.tar.gz: 044ced0298531ccd4e36cf46dbf4569b1c3588a9
5
5
  SHA512:
6
- metadata.gz: 62bba4611e56095855356bfd0e76c2173004f1948dcab31495701b94c29849b60df7a88a940b60334172f09f03b79606a8ee40a1b89518c9dc82e723c7334dae
7
- data.tar.gz: 34232db94d928667aded3b4cd6ac544f8a487993087938b74f626806bd0a6e14f9bf3ff2c982242fc2f55955181e50530d16eb387a07924a454812aff6e20640
6
+ metadata.gz: 8f39d14c4c672ce05b3d1ff6513bea3982358e23592d6ff661723157e7b25e2c6a363086eb8f7bd1b803102b1252a611a8492f69320b7b818930bc3f30b83bf1
7
+ data.tar.gz: ec26405e9ee9ba1798f8661f2ddf1bd67632d8654c3c5b4137648939dbcb4300658006fd0dc48d0c63e6b4c0f5111afe45c68ee79be57d9acbf1734c6153c286
data/bin/tailf2kafka CHANGED
@@ -188,7 +188,7 @@ def delete_old_tailed_files
188
188
  @mutex.synchronize do
189
189
  @files.each_key do |path|
190
190
  unless path.match(Regexp.new(Time.now.strftime(@files[path][:pattern])))
191
- if File.exists?(path) and File.stat(path).ino == @files[path][:inode] and File.stat(path).size == @files[path][:offset]
191
+ if File.exists?(path) and File.stat(path).ino == @files[path][:inode] and File.stat(path).size == @files[path][:offset] and (Time.now - File.stat(path).mtime) > 30
192
192
  puts "Deleteing old time pattern fully kafka produced file #{path}"
193
193
  FileUtils.rm_r(path)
194
194
  end
@@ -1,3 +1,3 @@
1
1
  module Tailf2Kafka
2
- VERSION ||= '0.1.1'
2
+ VERSION ||= '0.1.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tailf2kafka
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Piavlo