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?
|
||||
hash = {
|
||||
'class' => klass,
|
||||
'args' => [opts.deep_stringify_keys]
|
||||
'class' => klass
|
||||
}
|
||||
|
||||
if delay = opts.delete(:delay_for)
|
||||
|
@ -311,6 +310,8 @@ module Jobs
|
|||
hash['queue'] = queue
|
||||
end
|
||||
|
||||
hash['args'] = [opts.deep_stringify_keys]
|
||||
|
||||
DB.after_commit { klass.client_push(hash) }
|
||||
else
|
||||
# Otherwise execute the job right away
|
||||
|
|
Loading…
Reference in New Issue