def pre_delete_handler(**kwargs): if not settings.ES_LIVE_INDEX or 'instance' not in kwargs: return instance = kwargs['instance'] mappping_type = instance.get_mapping_type() if mappping_type.should_update(instance): unindex_objects.delay(mappping_type, [instance.id]) else: logging.info('Ignoring wiki document %r while updating search index', instance.id, exc_info=True)
def pre_delete_handler(**kwargs): if not settings.ES_LIVE_INDEX or 'instance' not in kwargs: return instance = kwargs['instance'] mappping_type = instance.get_mapping_type() if mappping_type.should_update(instance): unindex_objects.delay(mappping_type, [instance.id]) else: log.info('Ignoring wiki document %r while updating search index', instance.id, exc_info=True)
def pre_delete_handler(**kwargs): if not settings.ES_LIVE_INDEX or 'instance' not in kwargs: return instance = kwargs['instance'] unindex_objects.delay(instance.get_mapping_type(), [instance.id])
def pre_delete_handler(**kwargs): if not settings.ES_LIVE_INDEX or 'instance' not in kwargs: return instance = kwargs['instance'] unindex_objects.delay(instance.get_mapping_type(), [instance.id])