Beispiel #1
0
def analyze(foreign_id=None):
    """Re-analyze documents in the given source (or throughout)."""
    if foreign_id:
        source = Source.by_foreign_id(foreign_id)
        if source is None:
            raise ValueError("No such source: %r" % foreign_id)
        analyze_source.delay(source.id)
    else:
        for source in Source.all():
            analyze_source.delay(source.id)
Beispiel #2
0
def analyze(foreign_id=None):
    """Re-analyze documents in the given source (or throughout)."""
    if foreign_id:
        source = Source.by_foreign_id(foreign_id)
        if source is None:
            raise ValueError("No such source: %r" % foreign_id)
        analyze_source.delay(source.id)
    else:
        for source in Source.all():
            analyze_source.delay(source.id)
Beispiel #3
0
def sources():
    """List all sources."""
    for source in Source.all():
        print source.id, source.foreign_id, source.label
Beispiel #4
0
def sources():
    """List all sources."""
    for source in Source.all():
        print source.id, source.foreign_id, source.label
Beispiel #5
0
def index():
    pager = Pager(Source.all(ids=authz.sources(authz.READ)))
    return jsonify(pager)