I researched and found another way to do which was:

from retrying import retry
@retry(stop_max_delay=10000)
    def get_con_gateway(self):
        con = self.gateway['engine'].connect()
        return con

I used retrying module and made a method to create the connections.

Em sábado, 4 de abril de 2015 12:42:01 UTC-3, Henrique Fleury escreveu:
>
> When the database restarts my services are flooding the database 
> connection. I wonder if in SQLAlchemy has a parameter that step 
> create_engine () it does a delay between an attempt and another connection. 
> I need him to try to connect if you can not it wait X time to make a new 
> attempt.
>

-- 
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 http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to