Page MenuHomePhabricator

Make Tilerator pull expiration files on poke
Closed, ResolvedPublic

Description

Tilerator will store a "state" file in the same dir as osm_expiry files, with the name of the last file it processed. When poked via POST request, tilerator will read the state file, enumerate all tile expiration files in that directory, and add them all new ones to the job que, and update the state file. Optionally, tilerator will delete the expiration files.

TBD: should the flag "delete or not" be in app config or in the state file?

Event Timeline

Don't delete the files, we will need them for backups (T137378). Otherwise looks good.

Yurik moved this task from Backlog to In progress on the Maps-Sprint board.

This is now done, but hasn't been deployed yet. Example POST request:

http://localhost:16001/add
 ?expdirpath=/srv/osm_expire/             -- expiration files dir
 &expmask=expire.*                        -- regex to match expiration files
 &statefile=/home/yurik/osm_expire.state  -- tilerator uses this file to record last imported data file
 &fromZoom=10                             -- new jobs will be created from this zoom
 &beforeZoom=16                           -- and until (but not including) this zoom
 &generatorId=gen                         -- copy tiles from ("gen" will only produce non-empty tiles)
 &storageId=v3                            -- copy tiles to
 &deleteEmpty=1                           -- if tile is empty, make sure we don't store it, if it was there before