Skip to content

Commit

Permalink
Add more log messages
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrunner committed Dec 18, 2024
1 parent 0cea0d9 commit ec8e168
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tilecloud_chain/internal_mapcache.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,15 +179,17 @@ def compute_tile(self, tile: Tile) -> bool:
if tile.error:
_LOG.error("Tile %s %s in error: %s", tile.tilecoord, tile.formated_metadata, tile.error)
return False
success = True
for tile_ in tile.metadata["tiles"].values(): # type: ignore
if tile_.error:
_LOG.error("Tile %s %s in error: %s", tile_.tilecoord, tile_.formated_metadata, tile_.error)
return False
success = False
if tile_.data is None:
_LOG.error("Tile %s %s in error: no data", tile_.tilecoord, tile_.formated_metadata)
return False
success = False
_LOG.debug("Tile %s %s generated", tile_.tilecoord, tile_.formated_metadata)
self._cache_store.put_one(tile_)
return True
return success

@contextlib.contextmanager
def lock(self, tile: Tile) -> Iterator[None]:
Expand Down

0 comments on commit ec8e168

Please sign in to comment.