Skip to content

Commit

Permalink
Don't store tiles in error
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrunner committed Dec 18, 2024
1 parent 2a53106 commit 94df7a2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tilecloud_chain/internal_mapcache.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,11 +184,12 @@ 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)
success = False
if tile_.data is None:
elif tile_.data is None:
_LOG.error("Tile %s %s in error: no data", tile_.tilecoord, tile_.formated_metadata)
success = False
_LOG.debug("Tile %s %s generated", tile_.tilecoord, tile_.formated_metadata)
self._cache_store.put_one(tile_)
else:
_LOG.debug("Tile %s %s generated", tile_.tilecoord, tile_.formated_metadata)
self._cache_store.put_one(tile_)
return success

@contextlib.contextmanager
Expand Down

0 comments on commit 94df7a2

Please sign in to comment.