fluent-plugin-cat-sweep 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.travis.yml +10 -0
- data/CHANGELOG.md +6 -0
- data/README.md +4 -0
- data/fluent-plugin-cat-sweep.gemspec +1 -1
- data/lib/fluent/plugin/in_cat_sweep.rb +7 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 461b6372ab9b8ea7ca9baa69443793350c580d3883cb69b8c5299269665f6c33
|
4
|
+
data.tar.gz: 6d80c1a473201ad1fd914c01f61d6015886051f059319e0d10cf5ed1f8fea2ee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 27d7345c99a88dac1d1bde54d0ea0198b8a74eec8e9cf27a5d742bcf55f9de00a2c7a6697c125aaa55a8723cab18be33d8c6a0a9e5eb1e03588be5e5a40d037c
|
7
|
+
data.tar.gz: 71172be7137a25e36c752a7b4b02fee14cf9b0bdce0ae7eb4227b1a3a0b9a137d57cbcec5019bc181e11b707a1d7fa18d5a34dd50b7e78eefeb5942dc0cfa3a2
|
data/.travis.yml
CHANGED
@@ -4,6 +4,8 @@ rvm:
|
|
4
4
|
- 2.2.*
|
5
5
|
- '2.3'
|
6
6
|
- '2.4'
|
7
|
+
- '2.5'
|
8
|
+
- '2.6'
|
7
9
|
gemfile:
|
8
10
|
- gemfiles/Gemfile.fluentd.0.14
|
9
11
|
- gemfiles/Gemfile.fluentd.0.12
|
@@ -16,3 +18,11 @@ matrix:
|
|
16
18
|
gemfile: gemfiles/Gemfile.fluentd.0.10
|
17
19
|
- rvm: '2.4'
|
18
20
|
gemfile: gemfiles/Gemfile.fluentd.0.10.45
|
21
|
+
- rvm: '2.5'
|
22
|
+
gemfile: gemfiles/Gemfile.fluentd.0.10
|
23
|
+
- rvm: '2.5'
|
24
|
+
gemfile: gemfiles/Gemfile.fluentd.0.10.45
|
25
|
+
- rvm: '2.6'
|
26
|
+
gemfile: gemfiles/Gemfile.fluentd.0.10
|
27
|
+
- rvm: '2.6'
|
28
|
+
gemfile: gemfiles/Gemfile.fluentd.0.10.45
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -156,6 +156,10 @@ tmp/test
|
|
156
156
|
# This assures that fluentd emits the entire file contents together. Please note that buffer_chunk_limit
|
157
157
|
# must be larger than bytes in a file to be sent by buffered output plugins such as out_forward, out_s3.
|
158
158
|
file_event_stream false
|
159
|
+
|
160
|
+
# Optional. When doing flock files, open these files with "r+" mode if this option is true, nor with "r" mode.
|
161
|
+
# default is false.
|
162
|
+
flock_with_rw_mode false
|
159
163
|
</source>
|
160
164
|
```
|
161
165
|
|
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = "fluent-plugin-cat-sweep"
|
7
|
-
spec.version = "0.1.
|
7
|
+
spec.version = "0.1.5"
|
8
8
|
spec.authors = ["Civitaspo(takahiro.nakayama)", "Naotoshi Seo"]
|
9
9
|
spec.email = ["civitaspo@gmail.com", "sonots@gmail.com"]
|
10
10
|
|
@@ -22,6 +22,7 @@ module Fluent
|
|
22
22
|
config_param :remove_after_processing, :bool, :default => false
|
23
23
|
config_param :run_interval, :time, :default => 5
|
24
24
|
config_param :file_event_stream, :bool, :default => false
|
25
|
+
config_param :flock_with_rw_mode, :bool, :default => false
|
25
26
|
|
26
27
|
# To support log_level option implemented by Fluentd v0.10.43
|
27
28
|
unless method_defined?(:log)
|
@@ -288,8 +289,13 @@ module Fluent
|
|
288
289
|
end
|
289
290
|
end
|
290
291
|
|
292
|
+
def open_mode_for_flock
|
293
|
+
# When doing flock files on NFS, these files must be opend with writable mode.
|
294
|
+
@open_mode_for_flock ||= @flock_with_rw_mode ? "r+" : "r"
|
295
|
+
end
|
296
|
+
|
291
297
|
def lock_with_renaming(filename_from, filename_to)
|
292
|
-
file = File.open(filename_from)
|
298
|
+
file = File.open(filename_from, open_mode_for_flock)
|
293
299
|
begin
|
294
300
|
if file.flock(File::LOCK_EX | File::LOCK_NB)
|
295
301
|
File.rename(filename_from, filename_to)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-cat-sweep
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Civitaspo(takahiro.nakayama)
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2019-04-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: fluentd
|
@@ -154,7 +154,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
154
154
|
version: '0'
|
155
155
|
requirements: []
|
156
156
|
rubyforge_project:
|
157
|
-
rubygems_version: 2.
|
157
|
+
rubygems_version: 2.7.3
|
158
158
|
signing_key:
|
159
159
|
specification_version: 4
|
160
160
|
summary: Fluentd plugin to cat files and move them.
|