Well, thatβs why I donβt make any guarantees regarding the impact, because I did not test it at all, but you could define your own hook, for example.
ObjectSpace.define_finalizer(YOUR_RAILS_APP::Application, proc {puts "exiting now"})
Note that this will be done after at_exit , so the output of the rails application server will look like
Stopping ... Exiting exiting now
With Tin Man Solution Enabled
ObjectSpace.define_finalizer(YOUR_RAILS_APP::Application, proc {puts "exiting now"}) END { puts "exiting again" }
Exit
Stopping ... Exiting exiting again exiting now
source share