DEV: Ensure `delay_for` and `queue` are not passed as job arguments (#15824)
This regressed in 3a85c4d680
because deep_stringify_keys makes a copy of the `opts` hash
This commit is contained in:
parent
863262a5de
commit
f53d70ac63
|
@ -297,8 +297,7 @@ module Jobs
|
||||||
|
|
||||||
if ::Jobs.run_later?
|
if ::Jobs.run_later?
|
||||||
hash = {
|
hash = {
|
||||||
'class' => klass,
|
'class' => klass
|
||||||
'args' => [opts.deep_stringify_keys]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if delay = opts.delete(:delay_for)
|
if delay = opts.delete(:delay_for)
|
||||||
|
@ -311,6 +310,8 @@ module Jobs
|
||||||
hash['queue'] = queue
|
hash['queue'] = queue
|
||||||
end
|
end
|
||||||
|
|
||||||
|
hash['args'] = [opts.deep_stringify_keys]
|
||||||
|
|
||||||
DB.after_commit { klass.client_push(hash) }
|
DB.after_commit { klass.client_push(hash) }
|
||||||
else
|
else
|
||||||
# Otherwise execute the job right away
|
# Otherwise execute the job right away
|
||||||
|
|
Loading…
Reference in New Issue