252 |
252 |
253 |
253 |
254 def get_cnxset(config, source, bootstrap=False): |
254 def get_cnxset(config, source, bootstrap=False): |
255 if not config['connections-pooler-enabled']: |
255 if not config['connections-pooler-enabled']: |
256 return _BaseCnxSet(source) |
256 return _BaseCnxSet(source) |
|
257 idle_timeout = config['connections-pool-idle-timeout'] |
257 if bootstrap or config.quick_start: |
258 if bootstrap or config.quick_start: |
258 max_size = 1 |
259 min_size, max_size = 0, 1 |
259 else: |
260 else: |
260 max_size = config['connections-pool-size'] |
261 min_size, max_size = ( |
261 return _CnxSetPool(source, min_size=1, max_size=max_size) |
262 config['connections-pool-min-size'], |
|
263 config['connections-pool-max-size'], |
|
264 ) |
|
265 return _CnxSetPool(source, min_size=min_size, max_size=max_size, |
|
266 idle_timeout=idle_timeout) |
262 |
267 |
263 |
268 |
264 class Repository(object): |
269 class Repository(object): |
265 """a repository provides access to a set of persistent storages for |
270 """a repository provides access to a set of persistent storages for |
266 entities and relations |
271 entities and relations |