Esempio n. 1
0
def _reindex_resource_and_descendants(resource: IResource):
    catalogs = find_service(resource, 'catalogs')
    if catalogs is None:  # ease testing
        return
    resource_and_descendants = list_resource_with_descendants(resource)
    for res in resource_and_descendants:
        catalogs.reindex_index(res, 'private_visibility')
Esempio n. 2
0
def _reindex_resource_and_descendants(resource: IResource):
    catalogs = find_service(resource, 'catalogs')
    if catalogs is None:  # ease testing
        return
    resource_and_descendants = list_resource_with_descendants(resource)
    for res in resource_and_descendants:
        catalogs.reindex_index(res, 'private_visibility')
Esempio n. 3
0
def _mark_referenced_resources_as_changed(resource: IResource, registry: Registry):
    graph = find_graph(resource)
    resource_and_descendants = list_resource_with_descendants(resource)
    for res in resource_and_descendants:
        references = graph.get_references(res)
        for ref in references:
            _add_changelog_backrefs_for_resource(ref.target, registry)
Esempio n. 4
0
def _mark_referenced_resources_as_changed(resource: IResource,
                                          registry: Registry):
    graph = find_graph(resource)
    resource_and_descendants = list_resource_with_descendants(resource)
    for res in resource_and_descendants:
        references = graph.get_references(res)
        for ref in references:
            _add_changelog_backrefs_for_resource(ref.target, registry)