2
I have a list of 200 hosts to connect. The problem is that when I try to connect to a host that is not available, it takes about 10 seconds for me to receive an exception telling me that I have not connected. But when connected it takes less than 1 second to connect.
I wanted something like this:
if(engine.connect() > 1 segundo) para de tentar conectar
I tried to
create_engine(db_url, connect_args={'connect_timeout': 1})
Didn’t work.
I am using sqlachemy, trying to connect on SQL Server
Thank you
Please translate your question. You are at stackoverflow
– Lucas