Re: [sqlalchemy] [sqlalchemy/postgreSQL] way to handle server-end timeout

2018-01-12 Thread Mike Bayer
On Thu, Jan 11, 2018 at 9:14 PM, wrote: > Hello, > > Is below the way to reconnect to postgresql server automatically? > everytime I need to remake a session with > "Session = sessionmaker(bind=engine) > session = Session()" > , is this right? > > the codes below can work, but if I don't remake

[sqlalchemy] [sqlalchemy/postgreSQL] way to handle server-end timeout

2018-01-11 Thread gingerluo
Hello, Is below the way to reconnect to postgresql server automatically? everytime I need to remake a session with "Session = sessionmaker(bind=engine) session = Session()" , is this right? the codes below can work, but if I don't remake the session, it will failed at server timeout. #!/bin/