redu 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/lib/redu/analyzer.rb +20 -17
  2. data/lib/redu/version.rb +1 -1
  3. metadata +3 -3
@@ -168,25 +168,28 @@ module Redu
168
168
  end
169
169
 
170
170
  def analyze_key(key)
171
- obj_str = @redis.debug("OBJECT", key)
172
-
173
- rdo = RedisDebugObject.initialize_from_string(key,obj_str)
174
-
175
- prefix_str = derive_prefix(key)
176
- if prefix_str
177
- prefix = @prefixes[prefix_str]
178
- if !prefix
179
- prefix = KeyPrefix.new
180
- prefix.count = 1
181
- prefix.bytesize = rdo.bytesize
182
- @prefixes[prefix_str] = prefix
183
- else
184
- prefix.count += 1
185
- prefix.bytesize += rdo.bytesize
171
+ begin
172
+ obj_str = @redis.debug("OBJECT", key)
173
+
174
+ rdo = RedisDebugObject.initialize_from_string(key,obj_str)
175
+
176
+ prefix_str = derive_prefix(key)
177
+ if prefix_str
178
+ prefix = @prefixes[prefix_str]
179
+ if !prefix
180
+ prefix = KeyPrefix.new
181
+ prefix.count = 1
182
+ prefix.bytesize = rdo.bytesize
183
+ @prefixes[prefix_str] = prefix
184
+ else
185
+ prefix.count += 1
186
+ prefix.bytesize += rdo.bytesize
187
+ end
186
188
  end
189
+
190
+ @worst_offender_set.add(rdo)
191
+ rescue # Many times a key will be gone by the time we get to it in the array
187
192
  end
188
-
189
- @worst_offender_set.add(rdo)
190
193
  end
191
194
  end
192
195
  end
@@ -1,3 +1,3 @@
1
1
  module Redu
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 3
9
- version: 0.0.3
8
+ - 4
9
+ version: 0.0.4
10
10
  platform: ruby
11
11
  authors:
12
12
  - Curtis Spencer
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2012-02-05 00:00:00 -08:00
17
+ date: 2012-02-07 00:00:00 -08:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency