示例#1
0
文件: tasks.py 项目: 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)
示例#2
0
文件: signals.py 项目: lmorchard/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:
        log.info('Ignoring wiki document %r while updating search index',
                 instance.id, exc_info=True)
示例#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])
示例#4
0
文件: tasks.py 项目: AprilMorone/kuma
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])