update_manager: increase shell command timeouts

Give more time for a standard command to complete.  This may help prevent a git command from being terminated prematurely.

Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
Arksine 2021-03-17 19:24:49 -04:00
parent 48621da6aa
commit 5e99378466
1 changed files with 4 additions and 4 deletions

View File

@ -323,7 +323,7 @@ class CommandHelper:
break break
self.gh_init_evt.set() self.gh_init_evt.set()
async def run_cmd(self, cmd, timeout=10., notify=False, async def run_cmd(self, cmd, timeout=20., notify=False,
retries=1, env=None): retries=1, env=None):
cb = self.notify_update_response if notify else None cb = self.notify_update_response if notify else None
scmd = self.build_shell_command(cmd, callback=cb, env=env) scmd = self.build_shell_command(cmd, callback=cb, env=env)
@ -334,7 +334,7 @@ class CommandHelper:
if not retries: if not retries:
raise self.server.error("Shell Command Error") raise self.server.error("Shell Command Error")
async def run_cmd_with_response(self, cmd, timeout=10., env=None): async def run_cmd_with_response(self, cmd, timeout=20., env=None):
scmd = self.build_shell_command(cmd, None, env=env) scmd = self.build_shell_command(cmd, None, env=env)
result = await scmd.run_with_response(timeout, retries=5) result = await scmd.run_with_response(timeout, retries=5)
return result return result
@ -724,10 +724,10 @@ class GitUpdater:
return status return status
GIT_FETCH_TIMEOUT = 20. GIT_FETCH_TIMEOUT = 30.
GIT_FETCH_ENV_VARS = { GIT_FETCH_ENV_VARS = {
'GIT_HTTP_LOW_SPEED_LIMIT': "1000", 'GIT_HTTP_LOW_SPEED_LIMIT': "1000",
'GIT_HTTP_LOW_SPEED_TIME ': "15" 'GIT_HTTP_LOW_SPEED_TIME ': "20"
} }
GIT_MAX_LOG_CNT = 100 GIT_MAX_LOG_CNT = 100
GIT_LOG_FMT = \ GIT_LOG_FMT = \