Closed lucernae closed 5 years ago
I made this, but honestly I think it is still better to do it on demand because it's quite fast. For OSM Buildings, there will be lots of tiles to generate, it doesn't make sense to generate all.
Anyway, how to use:
./manage.py tile_seeder -z <zoom min, 10> <zoom max, 12> [layer slug name]
@lucernae were you not going to manage the seeding through rancher ie like a cron job maybe daily or twice daily
Yes @NyakudyaA I'm currently writing on it in this ticket to explain
The plan to use this management command in Rancher is to clone service from django and create a run once service for each layer. Then with --noinput
option, provide the command like this:
(Important settings, will be run once
, command
and entry point
. We uses celery entry point because it will not deal with migrate and collectstatic instance.)
Last, define the schedule here:
Unlike regular cron job, Rancher cron schedule starts from seconds. So 0 0 3 * * ?
means every day at 3 A.M.
If executed from command line, it will look like something like this.
I'm currently trying it on testing using above plan, but the command doesn't execute. I'm trying to figure out why. The command execute normally through django console at testing.
Ok, I think I understand. The log output in rancher only shows up after the command finished, so we can't see the progress. But the command ran
The seeding is working fine
Related with #422
New bounds and can be recalculated by triggering save signals. But the tile cache can not.