mirror of
https://github.com/mperham/sidekiq.git
synced 2022-11-09 13:52:34 -05:00
Polish for #2376
This commit is contained in:
parent
4889ce37e1
commit
879d7f3b9c
2 changed files with 5 additions and 4 deletions
|
@ -1,9 +1,9 @@
|
|||
3.3.5
|
||||
-----------
|
||||
|
||||
- Set a created_at attribute when jobs are created, and the enqueued_at only
|
||||
when they go into the queue. Aims to help with latency, specially for
|
||||
scheduled jobs. [#2373, mrsimo]
|
||||
- Set a `created_at` attribute when jobs are created, set `enqueued_at` only
|
||||
when they go into a queue. Fixes invalid latency calculations with scheduled jobs.
|
||||
[#2373, mrsimo]
|
||||
|
||||
3.3.4
|
||||
-----------
|
||||
|
|
|
@ -191,8 +191,9 @@ module Sidekiq
|
|||
end)
|
||||
else
|
||||
q = payloads.first['queue']
|
||||
now = Time.now.to_f
|
||||
to_push = payloads.map do |entry|
|
||||
entry['enqueued_at'.freeze] ||= Time.now.to_f
|
||||
entry['enqueued_at'.freeze] = now
|
||||
Sidekiq.dump_json(entry)
|
||||
end
|
||||
conn.sadd('queues'.freeze, q)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue