We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
connection_pool
1 parent 4801998 commit 65b2157Copy full SHA for 65b2157
lib/react/server_rendering.rb
@@ -16,7 +16,13 @@ module ServerRendering
16
# @return [void]
17
def self.reset_pool
18
options = { size: pool_size, timeout: pool_timeout }
19
- @pool = ConnectionPool.new(options) { renderer.new(renderer_options) }
+
20
+ # ConnectionPool v3+ uses keyword arguments rather than positional
21
+ @pool = if ConnectionPool::VERSION[0] <= "2"
22
+ ConnectionPool.new(options) { renderer.new(renderer_options) }
23
+ else
24
+ ConnectionPool.new(**options) { renderer.new(renderer_options) }
25
+ end
26
end
27
28
# Check a renderer out of the pool and use it to render the component.
0 commit comments