Skip to content

Commit

Permalink
Clarify middleware’s role; fix busted test
Browse files Browse the repository at this point in the history
  • Loading branch information
ryansch committed Jan 26, 2015
1 parent c911adb commit d748e54
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/sidekiq/client.rb
Expand Up @@ -55,7 +55,7 @@ def initialize(redis_pool=nil)
# 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'])
Expand All @@ -64,8 +64,10 @@ def push(item)
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

##
Expand Down

0 comments on commit d748e54

Please sign in to comment.