[sqlalchemy] ResourceClosedError

2011-11-06 Thread AZ (Wei-Ning Huang)
Hi list, I've been getting ResoruceClosedError with MySQL server, which worked fine with SQLite. I'am using Celery queue, and those erros always happen within the celery tasks. @celery.task def do_something(): records = SomeTable.pop_timeout() and for SomeTable.pop_timeout(),

Re: [sqlalchemy] ResourceClosedError

2011-11-06 Thread Wei-Ning Huang
Hi Michael, Thanks for the quick and detailed reply, but I still have some questions. 2011/11/6 Michael Bayer mike...@zzzcomputing.com On Nov 6, 2011, at 3:54 AM, AZ (Wei-Ning Huang) wrote: Hi list, I've been getting ResoruceClosedError with MySQL server, which worked fine

Re: [sqlalchemy] ResourceClosedError

2011-11-06 Thread Wei-Ning Huang
Hi Michael, 2011/11/7 Michael Bayer mike...@zzzcomputing.com On Nov 6, 2011, at 8:41 AM, Wei-Ning Huang wrote: db.query(Table).filter(...).update({'stamp': stamp}) db.commit() results = db.query(Table).filter_by(stamp=stamp).all() # ResourceClosedError raised here