Method: Spider::Model::Storage::ConnectionPool#release
- Defined in:
- lib/spiderfw/model/storage/connection_pool.rb
#release(conn) ⇒ Object
63 64 65 66 67 68 69 70 71 72 73 74 |
# File 'lib/spiderfw/model/storage/connection_pool.rb', line 63 def release(conn) if Spider.conf.get('storage.shared_connection') return end @connection_mutex.synchronize do #Spider.logger.debug("DB Pool (#{Thread.current}): releasing #{conn}") @free_connections << conn Thread.current[:storage_connections][storage_type].delete(@connection_params) @thread_connections.delete(Thread.current.object_id) @queue.signal end end |