Ejemplo n.º 1
0
def index():
    """index projects."""
    from yuan.models import index_project
    for name in Project.all():
        for item in Project.list(name):
            print '%(family)s/%(name)s' % item
            index_project(item, 'sync')
Ejemplo n.º 2
0
def initsearch():
    """init search engine."""
    from yuan.search import index_project
    for name in Project.all():
        for item in Project.list(name):
            print '%(family)s/%(name)s' % item
            item = Project(family=item['family'], name=item['name'])
            index_project(item, 'update')