I am trying to access a single table inside of a single function using python and tornado.
From the suggestions for my previous question am trying to use Bulk operation available in mongodb to do so. My attempt to insert was successful but during update am getting error.
My code is
bulk = db.Test.initialize_unordered_bulk_op()
print("1")
bulk.insert({"test":"we"})
# bulk.find({"test": "we"})
bulk.update({"test": "we"},{'$set':{"test": "false"}},{'$unset':{"Cid"}})
t = bulk.execute()
print(t)
Is something wrong in the query?
And when trying to print the answer to the find operation am getting
<tornado.concurrent.Future object at 0x02ED2630>
Can anyone guide me on how to do this bulk operation.