delete old cached map tiles
This commit is contained in:
parent
84b5c26f3d
commit
96dc678fe6
2 changed files with 20 additions and 1 deletions
|
@ -7,6 +7,8 @@ from django.utils.http import int_to_base36
|
|||
from django.utils.timezone import make_naive
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
from c3nav.mapdata.tasks import delete_old_cached_tiles
|
||||
|
||||
|
||||
class MapUpdate(models.Model):
|
||||
"""
|
||||
|
@ -51,6 +53,6 @@ class MapUpdate(models.Model):
|
|||
from c3nav.mapdata.render.base import LevelGeometries
|
||||
AltitudeArea.recalculate()
|
||||
LevelGeometries.rebuild()
|
||||
|
||||
super().save(**kwargs)
|
||||
cache.set('mapdata:last_update', (self.pk, self.datetime), 900)
|
||||
delete_old_cached_tiles.apply_async(countdown=5)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue