mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Allow the connection timeout to be configured on a per-server basis. Fixes #3388
This commit is contained in:
@@ -240,7 +240,15 @@ def create_maintenance_job(sid, did):
|
||||
cmd=utility, args=args
|
||||
)
|
||||
manager.export_password_env(p.id)
|
||||
p.set_env_variables(server)
|
||||
# Check for connection timeout and if it is greater than 0 then
|
||||
# set the environment variable PGCONNECT_TIMEOUT.
|
||||
if manager.connect_timeout > 0:
|
||||
env = dict()
|
||||
env['PGCONNECT_TIMEOUT'] = str(manager.connect_timeout)
|
||||
p.set_env_variables(server, env=env)
|
||||
else:
|
||||
p.set_env_variables(server)
|
||||
|
||||
p.start()
|
||||
jid = p.id
|
||||
except Exception as e:
|
||||
|
||||
Reference in New Issue
Block a user