Example #1
0
    def enqueue(self, action, instance):
        from parliament.search.models import IndexingTask
        it = IndexingTask(action=action, identifier=get_identifier(instance))
        if action == 'update':
            it.content_object = instance

        it.save()
Example #2
0
    def enqueue(self, action, instance):
        it = IndexingTask(
            action=action,
            identifier=get_identifier(instance)
        )
        if action == 'update':
            it.content_object = instance

        it.save()
    def enqueue(self, action, instance):
        from parliament.search.models import IndexingTask
        it = IndexingTask(
            action=action,
            identifier=get_identifier(instance)
        )
        if action == 'update':
            it.content_object = instance

        it.save()
Example #4
0
    def enqueue(self, action, instance):
        try:
            connections['default'].get_unified_index().get_index(
                instance.__class__)
        except NotHandled:
            return False

        it = IndexingTask(action=action, identifier=get_identifier(instance))
        if action == 'update':
            it.content_object = instance

        it.save()
    def enqueue(self, action, instance):
        try:
            connections['default'].get_unified_index().get_index(instance.__class__)
        except NotHandled:
            return False

        it = IndexingTask(
            action=action,
            identifier=get_identifier(instance)
        )
        if action == 'update':
            it.content_object = instance

        it.save()