marcelnicolay / mongotor

An asynchronous driver and toolkit for accessing MongoDB in Tornado
Other
57 stars 16 forks source link

browser hangs when using Gen #22

Closed abdelouahabb closed 12 years ago

abdelouahabb commented 12 years ago

hi here is the code:

class BaseHandler(tornado.web.RequestHandler): @tornado.web.removeslash def get_current_user(self): return self.get_secure_cookie("mechtari") @property def db(self): if not hasattr(BaseHandler,"_db"): _db = Database.connect("localhost:27017", "essog") return _db @property def fs(self): if not hasattr(BaseHandler,"_fs"): _fs = gridfs.GridFS(self.db) return _fs

class LoginHandler(BaseHandler): @tornado.web.asynchronous @tornado.gen.engine def post(self): email = self.get_argument("email") password = self.get_argument("pass1") dbmail = yield tornado.gen.Task(self.db.users.find, {"_id": email}) .... self.finish()

my browser then search for the response forever! am on windows 7 64bits and in other libraries it dont hang?

marcelnicolay commented 12 years ago

http://stackoverflow.com/questions/13351405/how-do-i-use-gridfs-with-libraries-that-dont-accept-non-blocking-gridfs/13365949#13365949

abdelouahabb commented 12 years ago

how much aproximatively will take to implement gridfs in mongotor?