gutting the pool out

This commit is contained in:
Jon Haddad
2014-06-19 09:53:36 -07:00
parent eed5d3ee7d
commit f9baed3d99
2 changed files with 0 additions and 28 deletions

View File

@@ -85,34 +85,7 @@ def setup(
cluster = Cluster(hosts) cluster = Cluster(hosts)
session = cluster.connect() session = cluster.connect()
session.row_factory = dict_factory session.row_factory = dict_factory
return
_max_connections = max_connections
if default_keyspace:
from cqlengine import models
models.DEFAULT_KEYSPACE = default_keyspace
_hosts = []
for host in hosts:
host = host.strip()
host = host.split(':')
if len(host) == 1:
port = 9160
elif len(host) == 2:
try:
port = int(host[1])
except ValueError:
raise CQLConnectionError("Can't parse port as int {}".format(':'.join(host)))
else:
raise CQLConnectionError("Can't parse host string {}".format(':'.join(host)))
_hosts.append(Host(host[0], port))
if not _hosts:
raise CQLConnectionError("At least one host required")
connection_pool = ConnectionPool(_hosts, username, password, consistency, timeout)
class ConnectionPool(object): class ConnectionPool(object):

View File

@@ -1,7 +1,6 @@
from unittest import skip from unittest import skip
from uuid import uuid4 from uuid import uuid4
import random import random
from cqlengine.connection import ConnectionPool
import mock import mock
import sure import sure