Status URL : add support for tileVeryOld
Closed this issue · 1 comments
esgn commented
Hi,
I hope it's the right place to post this remark. If I'm not mistaken the status URL response in mod_tile.c
does not take into account the case where tile state is tileVeryOld
.
Line 1262 in f645ed0
It's probably a detail but it could be misleading letting people think than a very old tile (age 1 year or more by default) is not due to be rendered.
Having changed the line for (state == tileOld || state == tileVeryOld) ? "due to be rendered" : "clean", mtime_str, atime_str,
the following test case is now consistent
# Create planet-import-complete 1 year in the past
touch -d "1 year ago" /mnt/osm-tiles/planet-import-complete
# Set metatile mtime 2 years in the past
touch -d "2 years ago" /mnt/osm-tiles/osmcarto/6/0/0/0/0/0.meta
# Check status given by mod_tile (now returns "Tile is due to be rendered" instead of "Tile is clean")
curl --silent --insecure "https://somedomain.com/osmcarto/6/6/6.png/status" | grep -m 1 -o '^[^.]\+'
# Request tile
curl --insecure --silent -H "Cache-Control: no-cache, no-store, must-revalidate" -H "Pragma: no-cache" -H "Expires: 0" "https://somedomain.com/osmcarto/6/6/6.png" > /dev/null
# Check metatile mtime value (metatile has been updated)
stat -c %y /mnt/osm-tiles/osmcarto/6/0/0/0/0/0.meta