Browse Source

[ruby/padrino] Cleanup for Iodine (#10271)

Remove some unused code.
Petrik de Heus 1 month ago
parent
commit
d4197fad5f

+ 0 - 4
frameworks/Ruby/padrino/app/controllers.rb

@@ -7,10 +7,6 @@ HelloWorld::App.controllers  do
     response['Server'] = 'padrino'
   end
 
-  after do
-    response['Date'] = Time.now.httpdate
-  end if defined?(Puma)
-
   get '/json', :provides => [:json] do
     {message: "Hello, World!"}.to_json
   end

+ 3 - 8
frameworks/Ruby/padrino/config/database.rb

@@ -8,14 +8,9 @@ opts = {
 }
 
 # Determine threading/thread pool size and timeout
-if defined?(Puma) && (threads = Puma.cli_config.options.fetch(:max_threads)) > 1
-  opts[:pool] = threads
-  opts[:checkout_timeout] = 10
-else
-  # TODO: ActiveRecord doesn't have a single-threaded mode?
-  opts[:pool] = 1
-  opts[:checkout_timeout] = 0
-end
+# TODO: ActiveRecord doesn't have a single-threaded mode?
+opts[:pool] = 512
+opts[:checkout_timeout] = 5
 
 
 # Setup our logger