feat: better logging for snapshot failure

This commit is contained in:
Iain Learmonth 2026-05-19 13:06:43 +01:00
parent e1362cea4b
commit 27ce5fc4a8

View file

@ -24,6 +24,6 @@ def generate_snapshot(id_: int) -> None:
snapshot.snapshot_published_at = datetime.now() snapshot.snapshot_published_at = datetime.now()
db.commit() db.commit()
except Exception as e: except Exception as e:
logging.error(e) logging.exception("Failed to generate snapshot %s", id_)
snapshot.snapshot_state = SnapshotState.FAILED snapshot.snapshot_state = SnapshotState.FAILED
db.commit() db.commit()