[Buildroot] [PATCH v2 2/2] support/scripts/pkg-stats: URL check using threads
Ricardo Martincoski
ricardo.martincoski at gmail.com
Sat Sep 29 05:42:45 UTC 2018
Hello,
On Fri, Sep 21, 2018 at 12:35 PM, Matt Weber wrote:
[snip]
> +def check_url_status_worker(url, url_status):
> + if url_status != "Missing" and url_status != "No Config.in":
> try:
> - url_status_code = requests.head(pkg.url, timeout=5).status_code
> + url_status_code = requests.head(url, timeout=5).status_code
In order to avoid false timeouts for slow hosts, or hosts with a high load, or
limited internet connection, or slow servers ... I think 30 seconds is a better
timeout here.
> if url_status_code >= 400:
> - pkg.url_status = "Invalid(%s)" % str(url_status_code)
> + return "Invalid(%s)" % str(url_status_code)
> except requests.exceptions.RequestException as e:
There is a warning from flake8 for this line. Please fix it in previous patch.
Regards,
Ricardo
More information about the buildroot
mailing list