1
0
Fork 0
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:
Ryan Schlesinger 2015-01-26 13:17:54 -08:00
parent c911adb667
commit d748e54b48

View file

@ -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
##