1
0
Fork 0
mirror of https://github.com/mperham/sidekiq.git synced 2022-11-09 13:52:34 -05:00

Merge pull request #2771 from ddrmanxbxfr/MinorApiOptimization

Avoid recomputing range_size everytime in API
This commit is contained in:
Anton Davydov 2016-01-14 18:49:16 +03:00
commit 57ca17fa37

View file

@ -227,7 +227,7 @@ module Sidekiq
while true do while true do
range_start = page * page_size - deleted_size range_start = page * page_size - deleted_size
range_end = page * page_size - deleted_size + (page_size - 1) range_end = range_start + (page_size - 1)
entries = Sidekiq.redis do |conn| entries = Sidekiq.redis do |conn|
conn.lrange @rname, range_start, range_end conn.lrange @rname, range_start, range_end
end end