Re: [sqlalchemy] The right way to use gevent with sqlalchemy

2017-07-17 Thread Tony Wang
gt; - we don't commit() the session in the same place that we are doing > individual insert(), delete(), select() statements - we should have a > single transaction surrounding a group of operations. > > "Make sure you have a clear notion of where transactions begin and > end

Re: [sqlalchemy] The right way to use gevent with sqlalchemy

2017-07-15 Thread Tony Wang
nd session? It doesn't work. If not, could you share me some demo code? Thanks! On Sat, Jul 15, 2017 at 11:51 PM Mike Bayer <mike...@zzzcomputing.com> wrote: > On Fri, Jul 14, 2017 at 8:08 PM, Tony Wang <plantpark@gmail.com> > wrote: > > I simplify a complex system of g

[sqlalchemy] The right way to use gevent with sqlalchemy

2017-07-14 Thread Tony Wang
I simplify a complex system of gevent with sqlachemy to a simple demo code . Before using of sqlachemy, pymysql is my best choice for communication between MySql and gevent because of its easy and direct usage. But now I