silence daily-maintenance exceptions

This commit is contained in:
rimu 2025-01-22 16:17:43 +13:00
parent aecaab691b
commit 8d6ab2a6f5

View file

@ -264,7 +264,6 @@ def register(app):
current_app.logger.info(f"{instance.domain} has no well-known/nodeinfo response") current_app.logger.info(f"{instance.domain} has no well-known/nodeinfo response")
except Exception as e: except Exception as e:
db.session.rollback() db.session.rollback()
current_app.logger.error(f"Error processing instance {instance.domain}: {e}")
instance.failures += 1 instance.failures += 1
finally: finally:
nodeinfo.close() nodeinfo.close()
@ -284,7 +283,7 @@ def register(app):
instance.nodeinfo_href = None instance.nodeinfo_href = None
except Exception as e: except Exception as e:
db.session.rollback() db.session.rollback()
current_app.logger.error(f"Error processing nodeinfo for {instance.domain}: {e}") instance.failures += 1
finally: finally:
node.close() node.close()
db.session.commit() db.session.commit()
@ -314,7 +313,7 @@ def register(app):
InstanceRole.role == 'admin').delete() InstanceRole.role == 'admin').delete()
except Exception as e: except Exception as e:
db.session.rollback() db.session.rollback()
current_app.logger.error(f"Error updating admins for {instance.domain}: {e}") instance.failures += 1
finally: finally:
if response: if response:
response.close() response.close()