zoo_meta: ne plus reconstruire les index lors d'un migrate (#21619)

Les index ne seront reconstruits que dans 2 cas:
- appel à la command zoo-rebuild-indexes
- appel à .save() sur un schéma (via l'admin par example)
This commit is contained in:
Benjamin Dauvergne 2018-03-07 10:31:30 +01:00 committed by Thomas NOEL
parent fc110948b5
commit 87f99bfa64
1 changed files with 0 additions and 7 deletions

View File

@ -23,17 +23,10 @@ class ZooMetaAppConfig(AppConfig):
name = 'zoo.zoo_meta'
verbose_name = _('metadatas')
def post_migrate(self, **kwargs):
from .models import EntitySchema
for schema in EntitySchema.objects.all():
schema.rebuild_indexes()
def post_save(self, sender, instance, **kwargs):
instance.rebuild_indexes()
def ready(self):
from .models import EntitySchema
post_migrate.connect(self.post_migrate)
post_save.connect(self.post_save, sender=EntitySchema)