I'm having trouble getting a simple async coroutine working with
tornado/motor:
@gen.coroutine
def find_by_id(db_async, group_id):
'''Get group by id'''
query = {
'_id': group_id,
}
yield motor.Op(db_async.groups.find_one(query))
2013-08-30T18:51:49.985048+00:00 app[web.1]: File
"/app/addv-api/models/groups.py", line 74, in find_by_id
2013-08-30T18:51:49.985048+00:00 app[web.1]: yield
motor.Op(db_async.groups.find_one(query))
2013-08-30T18:51:49.985048+00:00 app[web.1]: TypeError: 'MotorCollection'
object is not callable
Any help with this would be greatly appreciated!
Cheers!
David
--
--
You received this message because you are subscribed to the Google
Groups "mongodb-user" group.
To post to this group, send email to mongodb-user@googlegroups.com
To unsubscribe from this group, send email to
mongodb-user+unsubscribe@googlegroups.com
See also the IRC channel -- freenode.net#mongodb
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.