9
10
11
12
13
14
15
16
17
18
19
20
21
|
# File 'lib/spiderfw/model/storage/connection_pool.rb', line 9
def initialize(connection_params, provider)
@connection_params = connection_params
@provider = provider
@connection_mutex = Monitor.new
@queue = @connection_mutex.new_cond
@max_size = Spider.conf.get('storage.pool.size')
@max_size = provider.max_connections if provider.max_connections && provider.max_connections < @max_size
@timeout = Spider.conf.get('storage.pool.timeout')
@retry = Spider.conf.get('storage.pool.retry')
@connections = []
@free_connections = []
@thread_connections = {}
end
|