mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Ensure that Backup, Restore, and Maintenance should work properly when pgpass file is used. #6499
This commit is contained in:
@@ -2256,19 +2256,9 @@ class MViewNode(ViewNode, VacuumSettings):
|
||||
try:
|
||||
p = BatchProcess(
|
||||
desc=Message(sid, data, SQL),
|
||||
cmd=utility, args=args
|
||||
cmd=utility, args=args, manager_obj=manager
|
||||
)
|
||||
manager.export_password_env(p.id)
|
||||
# Check for connection timeout and if it is greater than 0
|
||||
# then set the environment variable PGCONNECT_TIMEOUT.
|
||||
timeout = manager.get_connection_param_value('connect_timeout')
|
||||
if timeout and int(timeout) > 0:
|
||||
env = dict()
|
||||
env['PGCONNECT_TIMEOUT'] = str(timeout)
|
||||
p.set_env_variables(server, env=env)
|
||||
else:
|
||||
p.set_env_variables(server)
|
||||
|
||||
p.set_env_variables(server)
|
||||
p.start()
|
||||
jid = p.id
|
||||
except Exception as e:
|
||||
|
||||
Reference in New Issue
Block a user