mirror of
https://github.com/mperham/sidekiq.git
synced 2022-11-09 13:52:34 -05:00
Clarify middleware’s role; fix busted test
This commit is contained in:
parent
c911adb667
commit
d748e54b48
1 changed files with 5 additions and 3 deletions
|
@ -55,7 +55,7 @@ module Sidekiq
|
|||
# All options must be strings, not symbols. NB: because we are serializing to JSON, all
|
||||
# symbols in 'args' will be converted to strings.
|
||||
#
|
||||
# Returns a unique Job ID.
|
||||
# Returns a unique Job ID. If middleware stops the job, nil will be returned instead.
|
||||
#
|
||||
# Example:
|
||||
# push('queue' => 'my_queue', 'class' => MyWorker, 'args' => ['foo', 1, :bat => 'bar'])
|
||||
|
@ -64,8 +64,10 @@ module Sidekiq
|
|||
normed = normalize_item(item)
|
||||
payload = process_single(item['class'], normed)
|
||||
|
||||
raw_push([payload]) if payload
|
||||
payload['jid']
|
||||
if payload
|
||||
raw_push([payload])
|
||||
payload['jid']
|
||||
end
|
||||
end
|
||||
|
||||
##
|
||||
|
|
Loading…
Add table
Reference in a new issue