Method: Sequel::TimedQueueConnectionPool#disconnect
- Defined in:
- lib/sequel/connection_pool/timed_queue.rb
#disconnect(opts = OPTS) ⇒ Object
Removes all connections currently in the pool’s queue. This method has the effect of disconnecting from the database, assuming that no connections are currently being used.
Once a connection is requested using #hold, the connection pool creates new connections to the database.
61 62 63 64 65 66 67 |
# File 'lib/sequel/connection_pool/timed_queue.rb', line 61 def disconnect(opts=OPTS) while conn = @queue.pop(timeout: 0) disconnect_connection(conn) end fill_queue nil end |