Make cassandra connection pool size configurable.

This commit is contained in:
Neil Williams
2012-02-02 11:20:42 -08:00
parent 8b386b9c59
commit fcd3f3bba3
2 changed files with 4 additions and 1 deletions

View File

@@ -117,6 +117,8 @@ rendercaches = 127.0.0.1:11211
permacache_memcaches = 127.0.0.1:11211
# cassandra hosts. one of these will be chosen at random by pycassa
cassandra_seeds = 127.0.0.1:9160
# number of connections to keep open to the cassandra ring
cassandra_pool_size = 5
# read/write consistency levels for Cassandra
cassandra_rcl = ONE
cassandra_wcl = ONE

View File

@@ -69,6 +69,7 @@ class Globals(object):
'comment_visits_period',
'min_membership_create_community',
'bcrypt_work_factor',
'cassandra_pool_size',
]
float_props = ['min_promote_bid',
@@ -236,7 +237,7 @@ class Globals(object):
stats=self.stats,
logging_name="main",
server_list=self.cassandra_seeds,
pool_size=len(self.cassandra_seeds),
pool_size=self.cassandra_pool_size,
timeout=2,
max_retries=3,
prefill=False