you can set that then with before_cursor_execute() and then reset it
on after_cursor_execute().
On Tue, Nov 13, 2018 at 12:44 PM Jonathan Vanasco wrote:
>
> In postgres, you can execute:
>
> SET statement_timeout = 6;
>
> at any point. It lasts until the end of the "session", which I
In postgres, you can execute:
SET statement_timeout = 6;
at any point. It lasts until the end of the "session", which I believe
would be the SqlAlchemy connection's lifetime.
On Monday, November 12, 2018 at 6:44:06 PM UTC-5, Mike Bayer wrote:
>
>
> if statement_timeout is accepted
On Mon, Nov 12, 2018 at 6:12 PM Brian Cherinka wrote:
>
> Hmm. Ok. I'm using a postgres database with the psycopg2 driver. I'm aware
> of the `statement_timeout` option in `postgres` which I can pass into the
> psycopg2 `connect` method. As far as I can tell there's not a way to pass
> that
Hmm. Ok. I'm using a postgres database with the psycopg2 driver. I'm
aware of the `statement_timeout` option in `postgres` which I can pass into
the psycopg2 `connect` method. As far as I can tell there's not a way to
pass that keyword in through SQLAlchemy after the db engine has been
On Mon, Nov 12, 2018 at 2:08 PM Brian Cherinka wrote:
>
> What's the best way to set a timeout for specific queries? I have a custom
> query tool that uses SQLAlchemy to build and submit queries. This tool can
> be used in a local python session with a database. I'm also using it to
> allow
What's the best way to set a timeout for specific queries? I have a custom
query tool that uses SQLAlchemy to build and submit queries. This tool can
be used in a local python session with a database. I'm also using it to
allow queries in a Flask web-app. In general, I do not want to apply a