Class: Gitlab::Redis::MultiStoreConnectionPool
- Inherits:
-
ConnectionPool
- Object
- ConnectionPool
- Gitlab::Redis::MultiStoreConnectionPool
- Defined in:
- lib/gitlab/redis/multi_store_connection_pool.rb
Instance Method Summary collapse
-
#with ⇒ Object
(also: #then)
We intercept the returned connection and borrow the connections before yielding the block.
Instance Method Details
#with ⇒ Object Also known as: then
We intercept the returned connection and borrow the connections before yielding the block.
8 9 10 11 12 13 14 15 16 |
# File 'lib/gitlab/redis/multi_store_connection_pool.rb', line 8 def with super do |conn| next yield conn unless conn.respond_to?(:with_borrowed_connection) conn.with_borrowed_connection do yield conn end end end |