Fix default port, align with asyncio_redis, fix pool

* Pool had broken methods that didn't make sense, so deleted
* Fix port to be right mongodb default port
* Change pool_size to poolsize to align with asyncio_redis
* Write logs to own logger
This commit is contained in:
Don Brown
2014-02-16 01:33:39 -07:00
parent 416c181415
commit 06bdf73134
4 changed files with 20 additions and 22 deletions

View File

@@ -50,7 +50,7 @@ class MongoProtocol(asyncio.Protocol):
def connection_made(self, transport):
self.transport = transport
self._is_connected = True
logger.log(logging.INFO, 'Mongo connection made with %')
logger.log(logging.INFO, 'Mongo connection made')
def connection_lost(self, exc):
self._is_connected = False
@@ -62,6 +62,11 @@ class MongoProtocol(asyncio.Protocol):
logger.log(logging.INFO, 'Mongo connection lost')
@property
def is_connected(self):
""" True when the underlying transport is connected. """
return self._is_connected
def data_received(self, data):
while self.__waiting_header:
self.__buffer += data