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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user