From b7504643fc57a6264fec57925a886d51e1a19e9c Mon Sep 17 00:00:00 2001 From: Arti Zirk Date: Fri, 4 Jul 2014 13:10:31 +0300 Subject: [PATCH] Added tailable_cursor and await_data query options to OP_QUERY --- asyncio_mongo/protocol.py | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/asyncio_mongo/protocol.py b/asyncio_mongo/protocol.py index 1ea5f83..cca62c8 100644 --- a/asyncio_mongo/protocol.py +++ b/asyncio_mongo/protocol.py @@ -23,6 +23,10 @@ from asyncio_mongo.log import logger _ONE = b"\x01\x00\x00\x00" _ZERO = b"\x00\x00\x00\x00" +_QUERY_OPTIONS = { + "tailable_cursor": 2, + "oplog_replay": 8, + "await_data": 32} """Low level connection to Mongo.""" @@ -163,14 +167,22 @@ class MongoProtocol(asyncio.Protocol): message = struct.pack("