1
0
Fork 0
mirror of https://github.com/mperham/sidekiq.git synced 2022-11-09 13:52:34 -05:00
This commit is contained in:
Mike Perham 2015-06-03 10:44:26 -07:00
parent 4889ce37e1
commit 879d7f3b9c
2 changed files with 5 additions and 4 deletions

View file

@ -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
-----------

View file

@ -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)