From 272cbd97fc56d57e9d9a206d6bd19470cbb536bd Mon Sep 17 00:00:00 2001 From: Arti Zirk Date: Fri, 4 Jul 2014 16:03:39 +0300 Subject: [PATCH] fist working code of a tailable cursor --- asyncio_mongo/protocol.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/asyncio_mongo/protocol.py b/asyncio_mongo/protocol.py index cca62c8..63793d1 100644 --- a/asyncio_mongo/protocol.py +++ b/asyncio_mongo/protocol.py @@ -32,10 +32,11 @@ _QUERY_OPTIONS = { class _MongoQuery(object): - def __init__(self, id, collection, limit): + def __init__(self, id, collection, limit, tailable=False): self.id = id self.limit = limit self.collection = collection + self.tailable = tailable self.documents = [] self.future = asyncio.Future() @@ -180,7 +181,7 @@ class MongoProtocol(asyncio.Protocol): query_opts |= _QUERY_OPTIONS["await_data"] query_opts = struct.pack("