Add git timeout for HTTP(S) operations
Using the GIT_HTTP_LOW_SPEED_LIMIT and GIT_HTTP_LOW_SPEED_TIME environmental variables, we have the ability to support timeouts via HTTP(S) for git. Currently, it is possible for a merger to block for ever if something happens to the network. Change-Id: I8ab245b221eae3a9faacd0b9ba6f7b14b27e6b0e Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
parent
29a8c23090
commit
06ab26d80c
|
@ -50,10 +50,14 @@ class Repo(object):
|
|||
self.log = logging.getLogger("zuul.Repo")
|
||||
else:
|
||||
self.log = logger
|
||||
# TODO(pabelanger): Expose to user via zuul.conf.
|
||||
self.env = {
|
||||
'GIT_HTTP_LOW_SPEED_LIMIT': '1000',
|
||||
'GIT_HTTP_LOW_SPEED_TIME': '30',
|
||||
}
|
||||
if sshkey:
|
||||
self.env = {'GIT_SSH_COMMAND': 'ssh -i %s' % (sshkey,)}
|
||||
else:
|
||||
self.env = {}
|
||||
self.env['GIT_SSH_COMMAND'] = 'ssh -i %s' % (sshkey,)
|
||||
|
||||
self.remote_url = remote
|
||||
self.local_path = local
|
||||
self.email = email
|
||||
|
|
Loading…
Reference in New Issue