log warning not error when peers are down.
This commit is contained in:
parent
bd991412b4
commit
980ccdce50
1 changed files with 5 additions and 0 deletions
|
@ -15,6 +15,7 @@ from catalog.common import (
|
||||||
SiteManager,
|
SiteManager,
|
||||||
SiteName,
|
SiteName,
|
||||||
)
|
)
|
||||||
|
from catalog.common.downloaders import DownloadError
|
||||||
from catalog.models import (
|
from catalog.models import (
|
||||||
Album,
|
Album,
|
||||||
Edition,
|
Edition,
|
||||||
|
@ -85,6 +86,10 @@ class FediverseInstance(AbstractSite):
|
||||||
if host in Takahe.get_blocked_peers():
|
if host in Takahe.get_blocked_peers():
|
||||||
return False
|
return False
|
||||||
return cls.get_json_from_url(u) is not None
|
return cls.get_json_from_url(u) is not None
|
||||||
|
except DownloadError:
|
||||||
|
if host and host in Takahe.get_neodb_peers():
|
||||||
|
logger.warning(f"Fedi item url download error: {url}")
|
||||||
|
return False
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
if host and host in Takahe.get_neodb_peers():
|
if host and host in Takahe.get_neodb_peers():
|
||||||
logger.error(f"Fedi item url validation error: {url} {e}")
|
logger.error(f"Fedi item url validation error: {url} {e}")
|
||||||
|
|
Loading…
Add table
Reference in a new issue