dynamo-autoscale 0.2.5 → 0.2.6

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.
data/CHANGELOG CHANGED
@@ -1,3 +1,8 @@
1
+ v0.2.6
2
+
3
+ - Fixed a bug where we crash out when CloudWatch returns nil for a consumed
4
+ field.
5
+
1
6
  v0.2.5
2
7
 
3
8
  - Fixed another bug that prevented scaling up.
@@ -10,6 +10,11 @@ module DynamoAutoscale
10
10
  DynamoAutoscale.current_table = table
11
11
  logger.debug "#{time}: Dispatching to #{table.name} with data: #{datum}"
12
12
 
13
+ # If a nil value comes through, we can reasoanbly assume that it should
14
+ # have been 0.
15
+ datum[:consumed_writes] = 0 if datum[:consumed_writes].nil?
16
+ datum[:consumed_reads] = 0 if datum[:consumed_reads].nil?
17
+
13
18
  if datum[:provisioned_reads] and (datum[:consumed_reads] > datum[:provisioned_reads])
14
19
  lost_reads = datum[:consumed_reads] - datum[:provisioned_reads]
15
20
 
@@ -1,3 +1,3 @@
1
1
  module DynamoAutoscale
2
- VERSION = '0.2.5'
2
+ VERSION = '0.2.6'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dynamo-autoscale
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.5
4
+ version: 0.2.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: