Skip to content

Commit

Permalink
Add an additional error message on tiles in error
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrunner committed Dec 20, 2024
1 parent 71cfde6 commit c4892a9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.12
2 changes: 2 additions & 0 deletions tilecloud_chain/store/postgresql.py
Original file line number Diff line number Diff line change
Expand Up @@ -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, exc_info=tile.error)
sqlalchemy_tile = (
session.query(Queue)
.where(and_(Queue.status == _STATUS_PENDING, Queue.id == tile.postgresql_id)) # type: ignore[attr-defined]
Expand Down

0 comments on commit c4892a9

Please sign in to comment.