lib/zapp/server.rb in zapp-0.2.1 vs lib/zapp/server.rb in zapp-0.2.2

- old
+ new

@@ -9,11 +9,11 @@ @socket_pipe = Zapp::Pipe.new @context_pipe = Zapp::Pipe.new @socket_pipe_receiver = Zapp::SocketPipe::Receiver.new(pipe: @socket_pipe) - @worker_pool = Zapp::WorkerPool.new(app: Zapp.config.app, socket_pipe: @socket_pipe, context_pipe: @context_pipe) + @worker_pool = Zapp::WorkerPool.new(socket_pipe: @socket_pipe, context_pipe: @context_pipe) end def run log_start @@ -36,28 +36,30 @@ def shutdown(err = nil) Zapp::Logger.info("Received signal #{err.class.name}") unless err.nil? Zapp::Logger.info("Gracefully shutting down workers, allowing request processing to finish") - socket_pipe_receiver.drain worker_pool.drain Zapp::Logger.info("Done. See you next time!") + Zapp::Logger.flush end private def log_start - Zapp::Logger.info(" + Zapp::Logger.info( + " ⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡ ⚡ ███████╗ █████╗ ██████╗ ██████╗ ⚡ ⚡ ╚══███╔╝██╔══██╗██╔══██╗██╔══██╗ ⚡ ⚡ ███╔╝ ███████║██████╔╝██████╔╝ ⚡ ⚡ ███╔╝ ██╔══██║██╔═══╝ ██╔═══╝ ⚡ ⚡ ███████╗██║ ██║██║ ██║ ⚡ ⚡ ╚══════╝╚═╝ ╚═╝╚═╝ ╚═╝ ⚡ ⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡ -") +" + ) Zapp::Logger.info("Zapp version: #{Zapp::VERSION}") Zapp::Logger.info("Environment: #{Zapp.config.mode}") Zapp::Logger.info("Serving: #{Zapp.config.env[Rack::RACK_URL_SCHEME]}://#{Zapp.config.host}:#{Zapp.config.port}") Zapp::Logger.info("Parallel workers: #{Zapp.config.parallelism}") Zapp::Logger.info("Ready to accept requests")