|
@@ -41,14 +41,14 @@ class QueryTestHandler(BaseHandler):
|
|
|
|
|
|
if queries == 0:
|
|
|
random_id = random.randint(1, 10000)
|
|
|
- world = yield motor.Op(db.world.find_one,{"id": random_id}, fields={"_id": 0, "id": 1, "randomNumber": 1})
|
|
|
+ world = yield motor.Op(db.World.find_one,{"_id": random_id}, fields={"_id": 1, "randomNumber": 1})
|
|
|
# Get first postion on arguments, and so first postion in mongo return
|
|
|
response = json.dumps(world)
|
|
|
else:
|
|
|
worlds = []
|
|
|
for i in xrange(int(queries)):
|
|
|
random_id = random.randint(1, 10000)
|
|
|
- world = yield motor.Op(db.world.find_one,{"id": random_id}, fields={"_id": 0, "id": 1, "randomNumber": 1})
|
|
|
+ world = yield motor.Op(db.World.find_one,{"_id": random_id}, fields={"_id": 1, "randomNumber": 1})
|
|
|
# Get first postion on arguments, and so first postion in mongo return
|
|
|
worlds.append(world)
|
|
|
response = json.dumps(worlds)
|