From d50d5e549cf76a8b7fce14059a9c991cde0d4367 Mon Sep 17 00:00:00 2001 From: Joaquim d'Souza Date: Wed, 2 Oct 2024 16:03:31 +0200 Subject: [PATCH] fix: dont retry link check task on exception --- wagtaillinkchecker/tasks.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wagtaillinkchecker/tasks.py b/wagtaillinkchecker/tasks.py index ccd3f5d..2e3a1d0 100644 --- a/wagtaillinkchecker/tasks.py +++ b/wagtaillinkchecker/tasks.py @@ -13,7 +13,10 @@ def check_link( link_pk, verbosity=1, ): - return check_link_sync(link_pk, verbosity=verbosity) + try: + return check_link_sync(link_pk, verbosity=verbosity) + except Exception as e: + print(f"Failed to check link {link_pk}: {e}") def check_link_sync(link_pk, verbosity=1):