Did I find the right examples for you? yes no

All Samples(5)  |  Call(5)  |  Derive(0)  |  Import(0)

src/i/n/indextank-service-HEAD/api/restresource.py   indextank-service(Download)
          it returns None.
        '''
        idx = Index.objects.filter(account=self._account_id, name=index_name)
        if len(idx):
            return idx[0]

src/h/u/humfrey-0.3.9/humfrey/elasticsearch/tasks.py   humfrey(Download)
def update_indexes_after_dataset_update(update_log, graphs, updated):
    for index in Index.objects.filter(update_after=update_log.update_definition):
        update_index(index)
 
@task(name='humfrey.elasticsearch.update_index')

src/h/u/humfrey-HEAD/humfrey/elasticsearch/tasks.py   humfrey(Download)
def update_indexes_after_dataset_update(sender, update_definition, store_graphs, when, **kwargs):
    for index in Index.objects.filter(update_after=update_definition):
        update_index(index)
 
update_completed.connect(update_indexes_after_dataset_update.delay)

src/m/a/mayan-HEAD/apps/document_indexing/views.py   mayan(Download)
    }
 
    queryset = Index.objects.filter(enabled=True)
 
    try:

src/m/a/mayan-HEAD/apps/document_indexing/api.py   mayan(Download)
 
    # Only update indexes where the document type is found or that do not have any document type specified
    for index in Index.objects.filter(Q(enabled=True) & (Q(document_types=None) | Q(document_types=document.document_type))):
        root_instance, created = IndexInstanceNode.objects.get_or_create(index_template_node=index.template_root, parent=None)
        for template_node in index.template_root.get_children():