Skip to content

Commit b88b4b5

Browse files
committed
Add log message and increase timeout
1 parent 1c7b1e4 commit b88b4b5

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

app/qa.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,15 +67,19 @@ class LinkTester(BuildTest):
6767
def __init__(self, concurrency=16, ignore_internal_links=False):
6868
"""
6969
Semaphore limits number of concurrent requests for performance
70-
Is still nonblocking"""
70+
Is still nonblocking
71+
"""
7172
self.concurrency = concurrency
7273
self.ignore_internal_links = ignore_internal_links
7374

7475
@staticmethod
7576
async def fetch(session, url, lock):
7677
"""Locked async HTTP GET"""
7778
async with lock:
78-
return await session.get(url, allow_redirects=False, timeout=3)
79+
try:
80+
return await session.get(url, allow_redirects=False, timeout=5)
81+
except asyncio.exceptions.TimeoutError:
82+
print(f"Took too long trying to fetch {url}")
7983

8084
async def get_failures(self, links):
8185
"""

0 commit comments

Comments
 (0)