mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fix an issue where Backup, Restore, and Maintenance not working if connection timeout is set in the server dialog. #5959
This commit is contained in:
@@ -2251,7 +2251,7 @@ class MViewNode(ViewNode, VacuumSettings):
|
||||
# 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 timeout > 0:
|
||||
if timeout and int(timeout) > 0:
|
||||
env = dict()
|
||||
env['PGCONNECT_TIMEOUT'] = str(timeout)
|
||||
p.set_env_variables(server, env=env)
|
||||
|
||||
@@ -406,7 +406,7 @@ def create_backup_objects_job(sid):
|
||||
# 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 timeout > 0:
|
||||
if timeout and int(timeout) > 0:
|
||||
env = dict()
|
||||
env['PGCONNECT_TIMEOUT'] = str(timeout)
|
||||
p.set_env_variables(server, env=env)
|
||||
|
||||
@@ -252,7 +252,7 @@ def create_maintenance_job(sid, did):
|
||||
# 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 timeout > 0:
|
||||
if timeout and int(timeout) > 0:
|
||||
env = dict()
|
||||
env['PGCONNECT_TIMEOUT'] = str(timeout)
|
||||
p.set_env_variables(server, env=env)
|
||||
|
||||
@@ -383,7 +383,7 @@ def create_restore_job(sid):
|
||||
# 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 timeout > 0:
|
||||
if timeout and int(timeout) > 0:
|
||||
env = dict()
|
||||
env['PGCONNECT_TIMEOUT'] = str(timeout)
|
||||
p.set_env_variables(server, env=env)
|
||||
|
||||
Reference in New Issue
Block a user