Method: Rack::Handler::Puma.run
- Defined in:
- lib/rack/handler/puma.rb
.run(app, **options) {|launcher| ... } ⇒ Object
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/rack/handler/puma.rb', line 63 def self.run(app, **) conf = self.config(app, ) events = .delete(:Silent) ? ::Puma::Events.strings : ::Puma::Events.stdio launcher = ::Puma::Launcher.new(conf, :events => events) yield launcher if block_given? begin launcher.run rescue Interrupt puts "* Gracefully stopping, waiting for requests to finish" launcher.stop puts "* Goodbye!" end end |