1
0
Fork 0
mirror of https://github.com/mperham/sidekiq.git synced 2022-11-09 13:52:34 -05:00

fix thread labels in TTIN dumps

This commit is contained in:
Mike Perham 2016-12-31 21:31:42 -08:00
parent 1a039f5708
commit 13443beb06
2 changed files with 2 additions and 1 deletions

View file

@ -142,7 +142,7 @@ module Sidekiq
end
when 'TTIN'
Thread.list.each do |thread|
Sidekiq.logger.warn "Thread TID-#{thread.object_id.to_s(36)} #{thread['label']}"
Sidekiq.logger.warn "Thread TID-#{thread.object_id.to_s(36)} #{thread['sidekiq_label']}"
if thread.backtrace
Sidekiq.logger.warn thread.backtrace.join("\n")
else

View file

@ -22,6 +22,7 @@ module Sidekiq
def safe_thread(name, &block)
Thread.new do
Thread.current['sidekiq_label'] = name
watchdog(name, &block)
end
end