fluent-plugin-redis-store-wejick 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 68715dd68777bbd76db9c5c5fb12e31e179b504f
4
- data.tar.gz: fb1f85789aa760acc9df39186a169331df45eb61
3
+ metadata.gz: 004ed2f685523c84e77982d5c03d83b04e912f92
4
+ data.tar.gz: 580b30a0ccee6b3a96f88dee9c501cb40166c9ce
5
5
  SHA512:
6
- metadata.gz: 1a43d03d371c99ea49dc55b9226767a1339502bf0ccd81fcbd26283e0acf96fe55c4564f5fe9fca05c6ad51be71c47398798c0357cdf0259405d40d982ad909f
7
- data.tar.gz: 1c4e68d6089eae6950c13652b1e5b1a8b4db85631faa7ead8b7083f0f76912e2ef2b2d3a49ac28bb5d4adb59ee36308e148f6707349cd5b902801f99586ea289
6
+ metadata.gz: acc9a55094cb28da2b17ed08215eb930ace9bd648c316fa08fd80cdbc4c0d2d8e5cdd6a6e5c90b9792a9259e3c7a52edba9f07edd2e5dc62451dbf3d41d41dbf
7
+ data.tar.gz: f484df1e218f81801eced086e27f4e232a1983da5919a397dfa1b24de1f58edbb1c98ee8f652f48a1522023bd2d7c9b8d7ea094fb96af39a61db596be14233b6
data/README.md CHANGED
@@ -110,8 +110,6 @@ Configuration
110
110
  | `format_type` | string | plain | format type for _value_ (`plain`/`json`/`msgpack`) |
111
111
  | `key_expire` | int | -1 | If set, the key will be expired in specified seconds |
112
112
  | `flush_interval` | time | 1 | Time interval which events will be flushed to Redis |
113
- | `prevent_duplicate` | (0,1) | 0 | Prevent duplicated value in one key (list) |
114
- | `tidy_string` | (0,1) | 0 | Unescape value |
115
113
  Note: either `key` or `key_path` is required.
116
114
 
117
115
  ### `string` storage specific options
@@ -126,7 +124,8 @@ No more options than common options.
126
124
  | Key | Type | Default | Description |
127
125
  | :---- | :----- | :----------------------- | :------------ |
128
126
  | `order` | string | asc | `asc`: **rpush**, `desc`: **lpush** |
129
-
127
+ | `prevent_duplicate` | (0,1) | 0 | Prevent duplicated value in one key (list) |
128
+ | `tidy_string` | (0,1) | 0 | Unescape value |
130
129
  ### `set` storage specific options
131
130
 
132
131
  No more options than common options.
@@ -2,7 +2,7 @@
2
2
  Gem::Specification.new do |gem|
3
3
  gem.name = "fluent-plugin-redis-store-wejick"
4
4
  gem.email = "wejick@gmail.com"
5
- gem.version = "0.0.2"
5
+ gem.version = "0.0.3"
6
6
  gem.authors = ["wejick", "Gian Giovani"]
7
7
  gem.licenses = ["Apache License Version 2.0"]
8
8
  gem.summary = %q{Redis(zset/set/list/string/publish) output plugin for Fluentd}
@@ -120,6 +120,7 @@ module Fluent
120
120
  value = get_value_from(record)
121
121
 
122
122
  if 0 < @tidy_string
123
+ $log.warn "tidy_string ",@tidy_string
123
124
  value = tidy_up_string(value)
124
125
  end
125
126
  if 0 < @only_alphabet
@@ -129,6 +130,7 @@ module Fluent
129
130
  end
130
131
  end
131
132
  if 0 < @prevent_duplicate
133
+ $log.warn "prevent duplicate ", @prevent_duplicate
132
134
  @redis.lrem key.to_s, 1, value.to_s
133
135
  end
134
136
  if @order == 'asc'
@@ -138,8 +140,9 @@ module Fluent
138
140
  end
139
141
  set_key_expire key
140
142
  if 0 < @value_length
143
+ $log.warn "trim ",@value_length
141
144
  script = generate_ltrim_script(key, @value_length, @order)
142
- @redis.eval script
145
+ @redis.eval(script,0)
143
146
  end
144
147
  end
145
148
 
@@ -183,6 +186,7 @@ module Fluent
183
186
  end
184
187
 
185
188
  def generate_ltrim_script(key, maxlen, order)
189
+ $log.warn key,maxlen,order,"\n"
186
190
  script = "local key = '" + key.to_s + "'\n"
187
191
  script += "local maxlen = " + maxlen.to_s + "\n"
188
192
  script += "local order ='" + order.to_s + "'\n"
@@ -243,6 +247,7 @@ module Fluent
243
247
  end
244
248
 
245
249
  def set_key_expire(key)
250
+ $log.warn "set expire key ", @key_expire
246
251
  if 0 < @key_expire
247
252
  @redis.expire key, @key_expire
248
253
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-redis-store-wejick
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - wejick
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-08-02 00:00:00.000000000 Z
12
+ date: 2016-08-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
@@ -77,7 +77,6 @@ files:
77
77
  - Gemfile
78
78
  - README.md
79
79
  - Rakefile
80
- - fluent-plugin-redis-store-wejick-0.0.1.gem
81
80
  - fluent-plugin-redis-store-wejick.gemspec
82
81
  - lib/fluent/plugin/out_redis_store_wejick.rb
83
82
  - test/helpers.rb
@@ -102,7 +101,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
102
101
  version: '0'
103
102
  requirements: []
104
103
  rubyforge_project:
105
- rubygems_version: 2.5.1
104
+ rubygems_version: 2.4.8
106
105
  signing_key:
107
106
  specification_version: 4
108
107
  summary: Redis(zset/set/list/string/publish) output plugin for Fluentd