composer-cli: Change timeout to 5 minutes

In some cases osbuild-composer with an empty cache can take longer than
a minute to depsolve and start a compose.
This commit is contained in:
Brian C. Lane 2020-06-16 16:36:42 -07:00
parent 261e5af463
commit 65d7397cf2
2 changed files with 4 additions and 4 deletions

View File

@ -126,7 +126,7 @@ def get_url_json_unlimited(socket_path, url, total_fn=None):
r_unlimited = http.request("GET", unlimited_url)
return json.loads(r_unlimited.data.decode('utf-8'))
def delete_url_json(socket_path, url, timeout=120):
def delete_url_json(socket_path, url):
"""Send a DELETE request to the url and return JSON response
:param socket_path: Path to the Unix socket to use for API communication
@ -136,7 +136,7 @@ def delete_url_json(socket_path, url, timeout=120):
:returns: The json response from the server
:rtype: dict
"""
http = UnixHTTPConnectionPool(socket_path, timeout=timeout)
http = UnixHTTPConnectionPool(socket_path)
r = http.request("DELETE", url)
return json.loads(r.data.decode("utf-8"))

View File

@ -26,7 +26,7 @@ import urllib3
# https://github.com/docker/docker-py/blob/master/docker/transport/unixconn.py
class UnixHTTPConnection(http.client.HTTPConnection, object):
def __init__(self, socket_path, timeout=60):
def __init__(self, socket_path, timeout=60*5):
"""Create an HTTP connection to a unix domain socket
:param socket_path: The path to the Unix domain socket
@ -48,7 +48,7 @@ class UnixHTTPConnection(http.client.HTTPConnection, object):
class UnixHTTPConnectionPool(urllib3.connectionpool.HTTPConnectionPool):
def __init__(self, socket_path, timeout=60):
def __init__(self, socket_path, timeout=60*5):
"""Create a connection pool using a Unix domain socket
:param socket_path: The path to the Unix domain socket