Skip to content

Commit

Permalink
Log batch ID if available, fixes sidekiq#2076
Browse files Browse the repository at this point in the history
  • Loading branch information
mperham committed Dec 6, 2014
1 parent 5047f92 commit 4457f19
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions Changes.md
@@ -1,3 +1,9 @@
HEAD
-----------

- Log Sidekiq Pro's Batch ID if available [#2076]


3.3.0
-----------

Expand Down
2 changes: 1 addition & 1 deletion lib/sidekiq/middleware/server/logging.rb
Expand Up @@ -4,7 +4,7 @@ module Server
class Logging

def call(worker, item, queue)
Sidekiq::Logging.with_context("#{worker.class.to_s} JID-#{item['jid']}") do
Sidekiq::Logging.with_context("#{worker.class.to_s} JID-#{item['jid']}#{" BID-#{item['bid']}" if item['bid']}") do
begin
start = Time.now
logger.info { "start" }
Expand Down

0 comments on commit 4457f19

Please sign in to comment.