From 9357ece8552561672c91be526c1c37a78dd809ac Mon Sep 17 00:00:00 2001 From: Georg Krause <mail@georg-krause.net> Date: Thu, 1 Dec 2022 19:35:57 +0100 Subject: [PATCH] Properly catch errors when polling instance information --- funkwhale_network/worker.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/funkwhale_network/worker.py b/funkwhale_network/worker.py index 4d93782..8fc2f20 100644 --- a/funkwhale_network/worker.py +++ b/funkwhale_network/worker.py @@ -1,3 +1,6 @@ +import logging +import traceback + from aiohttp import ClientSession from arq.cron import cron @@ -17,7 +20,11 @@ async def update_all(ctx): for check in domains: domain = check["name"] print(f"Checking domain {domain}") - await poll(ctx, domain) + try: + await poll(ctx, domain) + except Exception as e: + print("... couldn't load all information") + logging.error(traceback.format_exc()) async def startup(ctx): -- GitLab