commit d3b1dd8e776f97f4ab33b9500255a0fe6158bfd7
parent 3f7c0f84f9d039d4559225c7e2e97585c7fd8bc0
Author: René Wagner <rwa@clttr.info>
Date: Sat, 29 May 2021 10:56:34 +0200
more exception handling on link update
Diffstat:
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/gus/crawl.py b/gus/crawl.py
@@ -268,8 +268,10 @@ def index_links(from_resource, contained_resources):
"is_cross_host_like": Link.get_is_cross_host_like(from_resource, cr),
}
)
- Link.insert_many(data).execute()
-
+ try:
+ Link.insert_many(data).execute()
+ except Exception as e:
+ logging.error("Error insert links: %s",e)
def fetch_robots_file(robot_host):
robot_url = urljoin("gemini://{}".format(robot_host), "/robots.txt")