lib/redis_analytics/visit.rb in redis_analytics-1.0.1 vs lib/redis_analytics/visit.rb in redis_analytics-1.1.0
- old
+ new
@@ -103,10 +103,10 @@
def track(metric_name, metric_value)
n = 0
RedisAnalytics.redis_connection.hmset("#{@redis_key_prefix}#METRICS", metric_name, metric_value.class)
for_each_time_range(@t) do |ts|
key = "#{@redis_key_prefix}#{metric_name}:#{ts}"
- if metric_value.is_a?(Fixnum)
+ if metric_value.is_a?(Integer)
n = RedisAnalytics.redis_connection.incrby(key, metric_value)
else
n = RedisAnalytics.redis_connection.zincrby(key, 1, metric_value)
end
end