Ejemplo n.º 1
0
Archivo: tasks.py Proyecto: Arveti/kuma
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)
Ejemplo n.º 2
0
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)
Ejemplo n.º 3
0
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])
Ejemplo n.º 4
0
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])