diff --git a/lib/que/command_line_interface.rb b/lib/que/command_line_interface.rb index 7e9f2e67..5a60014c 100644 --- a/lib/que/command_line_interface.rb +++ b/lib/que/command_line_interface.rb @@ -247,9 +247,21 @@ def parse( $stop_que_executable = false %w[INT TERM].each { |signal| trap(signal) { $stop_que_executable = true } } + trap("TTIN") do + puts 'Dumping thread traces:' + Thread.list.each do |t| + puts "## Thread TID-#{t.object_id.to_s(36)} #{t['label']}" + if t.backtrace + puts t.backtrace.join("\n") + else + puts "\tThread has no backtrace available" + end + end + end + output.puts( <<~STARTUP - Que #{Que::VERSION} started worker process with: + Debug Que #{Que::VERSION} started worker process with: Worker threads: #{locker.workers.length} (priorities: #{locker.workers.map { |w| w.priority || 'any' }.join(', ')}) Buffer size: #{locker.job_buffer.maximum_size} Queues: