diff --git a/src/redturtle/volto/linkchecker.py b/src/redturtle/volto/linkchecker.py index 316f871..9e003a2 100644 --- a/src/redturtle/volto/linkchecker.py +++ b/src/redturtle/volto/linkchecker.py @@ -224,13 +224,13 @@ def _check_internal_link(self, link): return 404 @view.memoize - def _check_external_link(self, link, ttl=3600 * 6, timeout=5.0): + def _check_external_link(self, link, ttl=3600 * 6, timeout=1.0): """Check the external link""" - logger.info("Checking external link %s", link) + logger.warning("Checking external link %s", link) if link in self._external_links_status: last_update, status = self._external_links_status[link] - if (datetime.now() - last_update).total_seconds() < ttl: + if status == 200 and (datetime.now() - last_update).total_seconds() < ttl: return status try: headers = {"User-Agent": self.user_agent}