mirror of
https://github.com/mperham/sidekiq.git
synced 2022-11-09 13:52:34 -05:00
bad fix, #4345
This commit is contained in:
parent
dea48a3f94
commit
bd29278ad7
1 changed files with 4 additions and 6 deletions
|
@ -193,12 +193,6 @@ module Sidekiq
|
|||
end
|
||||
|
||||
def atomic_push(conn, payloads)
|
||||
# 6.0.0 push_bulk bug, #4321
|
||||
# TODO Remove in 6.1.0
|
||||
payloads.each do |hash|
|
||||
hash.delete("at") if hash.key?("at") && hash["at"].nil?
|
||||
end
|
||||
|
||||
if payloads.first.key?("at")
|
||||
conn.zadd("schedule", payloads.map { |hash|
|
||||
at = hash.delete("at").to_s
|
||||
|
@ -225,6 +219,10 @@ module Sidekiq
|
|||
end
|
||||
|
||||
def normalize_item(item)
|
||||
# 6.0.0 push_bulk bug, #4321
|
||||
# TODO Remove after a while...
|
||||
item.delete("at") if item.key?("at") && item["at"].nil?
|
||||
|
||||
raise(ArgumentError, "Job must be a Hash with 'class' and 'args' keys: { 'class' => SomeWorker, 'args' => ['bob', 1, :foo => 'bar'] }") unless item.is_a?(Hash) && item.key?("class") && item.key?("args")
|
||||
raise(ArgumentError, "Job args must be an Array") unless item["args"].is_a?(Array)
|
||||
raise(ArgumentError, "Job class must be either a Class or String representation of the class name") unless item["class"].is_a?(Class) || item["class"].is_a?(String)
|
||||
|
|
Loading…
Reference in a new issue