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
|
# All options must be strings, not symbols. NB: because we are serializing to JSON, all
|
||||||
# symbols in 'args' will be converted to strings.
|
# 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:
|
# Example:
|
||||||
# push('queue' => 'my_queue', 'class' => MyWorker, 'args' => ['foo', 1, :bat => 'bar'])
|
# push('queue' => 'my_queue', 'class' => MyWorker, 'args' => ['foo', 1, :bat => 'bar'])
|
||||||
|
@ -64,8 +64,10 @@ module Sidekiq
|
||||||
normed = normalize_item(item)
|
normed = normalize_item(item)
|
||||||
payload = process_single(item['class'], normed)
|
payload = process_single(item['class'], normed)
|
||||||
|
|
||||||
raw_push([payload]) if payload
|
if payload
|
||||||
payload['jid']
|
raw_push([payload])
|
||||||
|
payload['jid']
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
##
|
##
|
||||||
|
|
Loading…
Add table
Reference in a new issue