1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-12-25 16:28:11 +00:00

Fix timeout error with "save as" for large projects.

This commit is contained in:
grossmj 2018-06-07 22:26:23 +07:00
parent c18d855a10
commit 8851a55199

View File

@ -527,8 +527,8 @@ class Compute:
headers=headers headers=headers
)) ))
response = yield from self._session().request(method, url, headers=headers, data=data, auth=self._auth, chunked=chunked, timeout=timeout) response = yield from self._session().request(method, url, headers=headers, data=data, auth=self._auth, chunked=chunked, timeout=timeout)
except asyncio.TimeoutError as e: except asyncio.TimeoutError:
raise ComputeError("Timeout error when connecting to {}".format(url)) raise ComputeError("Timeout error for {} call to {} after {}s".format(method, url, timeout))
except (aiohttp.ClientError, aiohttp.ServerDisconnectedError, ValueError, KeyError, socket.gaierror) as e: except (aiohttp.ClientError, aiohttp.ServerDisconnectedError, ValueError, KeyError, socket.gaierror) as e:
# aiohttp 2.3.1 raises socket.gaierror when cannot find host # aiohttp 2.3.1 raises socket.gaierror when cannot find host
raise ComputeError(str(e)) raise ComputeError(str(e))
@ -641,7 +641,7 @@ class Compute:
List files in the project on computes List files in the project on computes
""" """
path = "/projects/{}/files".format(project.id) path = "/projects/{}/files".format(project.id)
res = yield from self.http_query("GET", path, timeout=120) res = yield from self.http_query("GET", path, timeout=None)
return res.json return res.json
@asyncio.coroutine @asyncio.coroutine