active_redis_stats 0.1.2 → 0.1.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
  SHA256:
3
- metadata.gz: fb7d07e1b3ca67010b61701d6564699459aede84cb4680c2d1928bd459c90840
4
- data.tar.gz: 1f33e1ada275c991e6fad46a31acab1fed6201943265073e1999487bdcc9c37d
3
+ metadata.gz: df7ba61778ec0a6a0abd910f5f846b7cff92fb73ea6263d24ff78ec8612824ca
4
+ data.tar.gz: 99eb45ef35ef5bee3e2a1e2ed3854849a81dfe8a5e4c1c2605d7e3da50b5baf5
5
5
  SHA512:
6
- metadata.gz: b02b95f4a733d079b085660df89386ddb570d6f2e133c849bf5d523284125e11d62b7e5312ff9d3c19275e4c58db78563bc23106e7338cc08d0456e2eedaf6e1
7
- data.tar.gz: e07d4b19cac70bd86de0652bf93151cf833ec4307b5f1d1150e70b21a54fdc9ab0d83288ad0cfc0ccf1d0d25b8fa920364035573b7a4bddbbee993d9c3aa5e19
6
+ metadata.gz: 3fa57c7ff2885a69e0e799d2441d4953a9c8084704e361625704bf78e118407ecc6310d6d58949c49d57d687a9568787abeab4acfefe0f6c144d673872241b0a
7
+ data.tar.gz: cc99c6d7f191947c5a7e812a94477abc776d9dee6fe283cd56871a599e943e55d3be52a2412d1e3ba08fbfcfbf429346f7ee92d2be4744280797566796cbc37c
@@ -13,7 +13,12 @@ module ActiveRedisStats
13
13
 
14
14
  def total_intervals(key, format: :month, offset: 0)
15
15
  keys = send("#{format}_keys", offset: offset)
16
- keys.collect { |k| total("#{key}:#{k}") }
16
+ keys = keys.collect { |k| primary_key("#{key}:#{k}") }
17
+
18
+ ActiveRedisDB::String
19
+ .evaluate
20
+ .find_each(*keys)
21
+ .map(&:to_i)
17
22
  end
18
23
  end
19
24
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ActiveRedisStats
4
- VERSION ||= '0.1.2'
4
+ VERSION ||= '0.1.3'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_redis_stats
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juan Gomez
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-01-21 00:00:00.000000000 Z
11
+ date: 2019-03-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: active_object