On Tue, Feb 6, 2018 at 1:36 PM, André Cruz <[email protected]> wrote:
> Hello Mike.
>
>
> On 6 Feb 2018, at 16:36, Mike Bayer <[email protected]> wrote:
>
> So it's only using SQLAlchemy''s pool functionality to manage Django DB
> connections. I guess I just have to pass the "dbapi=psycopg2" parameter when
> creating the dialect?
>
>
> yes or report it as a bug over to that project, they can just fix it.
>
>
> Apparently this is not enough. The ping command will throw a
> "django.db.utils.OperationalError", which is not caught by the except clause
> "except self.dbapi.Error as err:".

this sounds like some kind of integration package so perhaps they can
catch and re-raise that?  but yes, pool_pre_ping is designed with
SQLAlchemy dialects in mind :)


>
> It seems I will not be able to use the "pre_ping" functionality with this
> pool of Django DB connections.
>
> Can I just subclass postgresql.dialect and override the do_ping() method or
> will that leave me with even more problems?
>
> Thank you and best regards,
> André
>
> --
> SQLAlchemy -
> The Python SQL Toolkit and Object Relational Mapper
>
> http://www.sqlalchemy.org/
>
> To post example code, please provide an MCVE: Minimal, Complete, and
> Verifiable Example. See http://stackoverflow.com/help/mcve for a full
> description.
> ---
> You received this message because you are subscribed to the Google Groups
> "sqlalchemy" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/sqlalchemy.
> For more options, visit https://groups.google.com/d/optout.

-- 
SQLAlchemy - 
The Python SQL Toolkit and Object Relational Mapper

http://www.sqlalchemy.org/

To post example code, please provide an MCVE: Minimal, Complete, and Verifiable 
Example.  See  http://stackoverflow.com/help/mcve for a full description.
--- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to