fix lock problems… hopefully
This commit is contained in:
parent
27380c86b7
commit
da115171d1
1 changed files with 1 additions and 1 deletions
|
@ -78,7 +78,7 @@ class MapUpdate(models.Model):
|
||||||
@contextmanager
|
@contextmanager
|
||||||
def lock(cls):
|
def lock(cls):
|
||||||
with transaction.atomic():
|
with transaction.atomic():
|
||||||
yield cls.objects.select_for_update().earliest()
|
yield cls.objects.select_for_update().get(pk=cls.objects.earliest().pk)
|
||||||
|
|
||||||
def _changed_geometries_filename(self):
|
def _changed_geometries_filename(self):
|
||||||
return os.path.join(settings.CACHE_ROOT, 'changed_geometries', 'update_%d.pickle' % self.pk)
|
return os.path.join(settings.CACHE_ROOT, 'changed_geometries', 'update_%d.pickle' % self.pk)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue