mirror of
https://github.com/mperham/sidekiq.git
synced 2022-11-09 13:52:34 -05:00
Avoid use of Array#pop
This commit is contained in:
parent
20c616e971
commit
7cb9f42523
1 changed files with 3 additions and 3 deletions
|
@ -52,7 +52,6 @@ module Sidekiq
|
||||||
conn.zcard('retry')
|
conn.zcard('retry')
|
||||||
conn.zcard('dead')
|
conn.zcard('dead')
|
||||||
conn.scard('processes')
|
conn.scard('processes')
|
||||||
|
|
||||||
conn.lrange("queue:default", -1, -1)
|
conn.lrange("queue:default", -1, -1)
|
||||||
conn.smembers('processes')
|
conn.smembers('processes')
|
||||||
conn.smembers('queues'.freeze)
|
conn.smembers('queues'.freeze)
|
||||||
|
@ -66,8 +65,9 @@ module Sidekiq
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
workers_size = pipe2_res.pop(pipe1_res[7].size).map(&:to_i).inject(0, &:+)
|
s = pipe1_res[7].size
|
||||||
enqueued = pipe2_res.pop(pipe1_res[8].size).map(&:to_i).inject(0, &:+)
|
workers_size = pipe2_res[0...s].map(&:to_i).inject(0, &:+)
|
||||||
|
enqueued = pipe2_res[s..-1].map(&:to_i).inject(0, &:+)
|
||||||
|
|
||||||
default_queue_latency = if (entry = pipe1_res[6].first)
|
default_queue_latency = if (entry = pipe1_res[6].first)
|
||||||
Time.now.to_f - Sidekiq.load_json(entry)['enqueued_at']
|
Time.now.to_f - Sidekiq.load_json(entry)['enqueued_at']
|
||||||
|
|
Loading…
Reference in a new issue