From f6ddb47fdf140fd99f671b25c94b705a89daaa30 Mon Sep 17 00:00:00 2001 From: Thomas Sileo Date: Fri, 1 Nov 2019 12:33:40 +0100 Subject: [PATCH] Fix the fetch remote question task for delete ones --- blueprints/tasks.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/blueprints/tasks.py b/blueprints/tasks.py index 863307e..72343a7 100644 --- a/blueprints/tasks.py +++ b/blueprints/tasks.py @@ -538,7 +538,12 @@ def task_fetch_remote_question() -> _Response: "activity.object.id": iri, } ) - remote_question = ap.get_backend().fetch_iri(iri, no_cache=True) + try: + remote_question = ap.get_backend().fetch_iri(iri, no_cache=True) + except (ActivityGoneError, ActivityNotFoundError): + app.logger.info("f{iri} not found, no retry") + return "" + # FIXME(tsileo): compute and set `meta.object_visiblity` (also update utils.py to do it) if ( local_question