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

change to easy-to-understand variable name queue

This commit is contained in:
Madogiwa 2019-04-27 21:04:46 +09:00 committed by Mike Perham
parent b76dfb9e05
commit d16572bcdd

View file

@ -194,14 +194,14 @@ module Sidekiq
[at, Sidekiq.dump_json(hash)] [at, Sidekiq.dump_json(hash)]
}) })
else else
q = payloads.first["queue"] queue = payloads.first["queue"]
now = Time.now.to_f now = Time.now.to_f
to_push = payloads.map { |entry| to_push = payloads.map { |entry|
entry["enqueued_at"] = now entry["enqueued_at"] = now
Sidekiq.dump_json(entry) Sidekiq.dump_json(entry)
} }
conn.sadd("queues", q) conn.sadd("queues", queue)
conn.lpush("queue:#{q}", to_push) conn.lpush("queue:#{queue}", to_push)
end end
end end