lib/logster/redis_rate_limiter.rb in logster-2.12.2 vs lib/logster/redis_rate_limiter.rb in logster-2.13.0
- old
+ new
@@ -79,25 +79,20 @@
end
private
def self.key_prefix(redis_prefix)
- if redis_prefix
- "#{redis_prefix.call}:#{PREFIX}"
- else
- PREFIX
- end
-
+ redis_prefix ? "#{redis_prefix.call}:#{PREFIX}" : PREFIX
end
def key_prefix
self.class.key_prefix(@redis_prefix)
end
def mget_keys(bucket_num)
keys = @mget_keys.dup
keys.delete_at(bucket_num)
- keys.map { |key| "'#{key}'" }.join(', ')
+ keys.map { |key| "'#{key}'" }.join(", ")
end
def bucket_number(time)
(time % @duration) / @bucket_range
end