Permalink
Browse files

probing for backtrace on heroku

  • Loading branch information...
1 parent 651b9bb commit ba39d8eabd2d3dd1ec6d8994b25ff01fcd0c7b47 @Gurpartap committed Aug 23, 2012
Showing with 7 additions and 0 deletions.
  1. +7 −0 lib/sidekiq/cli.rb
View
@@ -5,6 +5,13 @@
end
trap 'TERM' do
+ # probing for backtrace on heroku.
+ Thread.list.each do |thread|
+ Sidekiq.logger.info "Thread TID-#{thread.object_id.to_s(36)} #{thread['label']}"
+ Sidekiq.logger.info thread.backtrace.join("\n")
+ end
+ sleep 2
+
# Heroku sends TERM and then waits 10 seconds for process to exit.
Sidekiq::CLI.instance.interrupt
end

0 comments on commit ba39d8e

Please sign in to comment.