mirror of
https://github.com/mperham/sidekiq.git
synced 2022-11-09 13:52:34 -05:00
merge master
This commit is contained in:
commit
ffa30bd4a4
3 changed files with 13 additions and 3 deletions
|
@ -29,9 +29,15 @@ This release has major breaking changes. Read and test carefully in production.
|
|||
HEAD
|
||||
---------
|
||||
|
||||
- Fix stale `enqueued_at` when retrying [#4149]
|
||||
|
||||
5.2.6
|
||||
---------
|
||||
|
||||
- Fix edge case where a job failure during Redis outage could result in a lost job [#4141]
|
||||
- Better handling of malformed job arguments in payload [#4095]
|
||||
- Restore bootstap's dropdown css component [#4099, urkle]
|
||||
- Display human-friendly time diff for longer queue latencies [#4111, interlinked]
|
||||
- Allow `Sidekiq::Worker#set` to be chained
|
||||
|
||||
5.2.5
|
||||
|
|
|
@ -197,7 +197,7 @@ module Sidekiq
|
|||
q = payloads.first["queue"]
|
||||
now = Time.now.to_f
|
||||
to_push = payloads.map { |entry|
|
||||
entry["enqueued_at"] ||= now
|
||||
entry["enqueued_at"] = now
|
||||
Sidekiq.dump_json(entry)
|
||||
}
|
||||
conn.sadd("queues", q)
|
||||
|
|
|
@ -113,15 +113,19 @@ describe Sidekiq::Web do
|
|||
assert_equal 200, last_response.status
|
||||
assert_match(/foo/, last_response.body)
|
||||
refute_match(/HardWorker/, last_response.body)
|
||||
assert_match(/0.0/, last_response.body)
|
||||
refute_match(/datetime/, last_response.body)
|
||||
Sidekiq::Queue.new("foo").clear
|
||||
|
||||
assert Sidekiq::Client.push('queue' => :foo, 'class' => WebWorker, 'args' => [1, 3], 'enqueued_at' => Time.now.to_f - 65)
|
||||
Time.stub(:now, Time.now - 65) do
|
||||
assert Sidekiq::Client.push('queue' => :foo, 'class' => WebWorker, 'args' => [1, 3])
|
||||
end
|
||||
|
||||
get '/queues'
|
||||
assert_equal 200, last_response.status
|
||||
assert_match(/foo/, last_response.body)
|
||||
refute_match(/WebWorker/, last_response.body)
|
||||
refute_match(/HardWorker/, last_response.body)
|
||||
assert_match(/65.0/, last_response.body)
|
||||
assert_match(/datetime/, last_response.body)
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue