From b2d62e39fb0019b54bf735677785f6f6ad82617d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Brunner?= Date: Fri, 20 Dec 2024 08:36:54 +0100 Subject: [PATCH] Add an additional error message on tiles in errror --- tilecloud_chain/store/postgresql.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tilecloud_chain/store/postgresql.py b/tilecloud_chain/store/postgresql.py index df37d5475..902477b91 100644 --- a/tilecloud_chain/store/postgresql.py +++ b/tilecloud_chain/store/postgresql.py @@ -589,6 +589,8 @@ def delete_one(self, tile: Tile) -> Tile: """Delete the meta tile from the queue.""" with self.SessionMaker() as session: if tile.error: + if isinstance(tile.error, Exception): + _LOGGER.warning("Error while processing the tile %s", tile, exec_info=tile.error) sqlalchemy_tile = ( session.query(Queue) .where(and_(Queue.status == _STATUS_PENDING, Queue.id == tile.postgresql_id)) # type: ignore[attr-defined]