Method: Spider::Model::Storage::BaseStorage#release

Defined in:
lib/spiderfw/model/storage/base_storage.rb

#releasevoid

This method returns an undefined value.

Releases the current connection to the pool.



211
212
213
214
215
216
217
218
219
220
# File 'lib/spiderfw/model/storage/base_storage.rb', line 211

def release
    # The subclass should check if the connection is alive, and if it is not call remove_connection instead
    c = curr[:conn]
    #Spider.logger.debug("#{self} in thread #{Thread.current} releasing #{curr[:conn]}")
    curr[:conn] = nil
    self.class.release_connection(c, @connection_params)
    #Spider.logger.debug("#{self} in thread #{Thread.current} released #{curr[:conn]}")
    return nil
    #@conn = nil
end