lib/rhcf/timeseries/redis_strategies.rb in rhcf-timeseries-2.0.0pre vs lib/rhcf/timeseries/redis_strategies.rb in rhcf-timeseries-2.0.1pre
- old
+ new
@@ -193,10 +193,10 @@
table.insert(counter_tuples, {subject, counter_total} )
end
table.sort(counter_tuples, function(a, b) return b[2] < a[2] end )
- return counter_tuples
+ return {unpack(counter_tuples, 1, limit)}
EOF
smembers_matching = <<-EOF
local matches = {}
for _, val in pairs(redis.call('smembers', KEYS[1])) do