merry_go_round 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
@@ -47,10 +47,9 @@ module MerryGoRound
|
|
47
47
|
|
48
48
|
# Loop through all of the granularities except for the first one
|
49
49
|
MerryGoRound.granularities.each_with_index do |granularity, index|
|
50
|
+
# Skip minutes since the Redis aggregator does those
|
50
51
|
next if index == 0
|
51
52
|
|
52
|
-
# TODO: Check time interval to see if we have enough data to do this granularity
|
53
|
-
|
54
53
|
# Time interval for granularity
|
55
54
|
interval = seconds(granularity)
|
56
55
|
|
@@ -67,6 +66,9 @@ module MerryGoRound
|
|
67
66
|
range = window(granularity, Time.at(timestamp).utc)
|
68
67
|
break unless range.first < now and range.last < now
|
69
68
|
|
69
|
+
# Check time interval to see if we have enough data to do this granularity
|
70
|
+
break if Aggregation.where('key = ? AND granularity = ? AND timestamp = ?', result.key, granularity, range.first).first
|
71
|
+
|
70
72
|
children = Aggregation.where('key = ? AND granularity = ? AND timestamp >= ? AND timestamp <= ?', result.key, prev_gran, range.first, range.last).order('timestamp ASC')
|
71
73
|
break unless children.length > 0
|
72
74
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: merry_go_round
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -152,7 +152,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
152
152
|
version: '0'
|
153
153
|
segments:
|
154
154
|
- 0
|
155
|
-
hash:
|
155
|
+
hash: 3985102410336867870
|
156
156
|
requirements: []
|
157
157
|
rubyforge_project:
|
158
158
|
rubygems_version: 1.8.23
|