Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

probing for backtrace on heroku

  • Loading branch information...
commit ba39d8eabd2d3dd1ec6d8994b25ff01fcd0c7b47 1 parent 651b9bb
Gurpartap Singh authored
Showing with 7 additions and 0 deletions.
  1. +7 −0 lib/sidekiq/cli.rb
7 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
Please sign in to comment.
Something went wrong with that request. Please try again.