Increase validation timeout to 2 seconds so we can give time for geographically distant image servers to respond without being filtered. This is cached, so the performance should be minimal.
@@ -32,7 +32,7 @@ def validate_images(results, image_urls):
if cached_statuses[idx] is None:
to_verify[url] = idx
reqs = (
- grequests.head(u, allow_redirects=False, timeout=0.2, verify=False)
+ grequests.head(u, allow_redirects=False, timeout=2, verify=False)
for u in to_verify.keys()
)
verified = grequests.map(reqs, exception_handler=_validation_failure)
