Пример #1
0
def index():
    """Generate a list of all crawlers, alphabetically, with op counts."""
    crawlers = []
    for crawler in manager:
        data = Event.get_counts(crawler)
        data["last_active"] = crawler.last_run
        data["total_ops"] = crawler.op_count
        data["running"] = crawler.is_running
        data["crawler"] = crawler
        crawlers.append(data)
    return render_template("index.html", crawlers=crawlers)
Пример #2
0
def crawlers_index():
    """Generate a list of all crawlers, sorted alphabetically, with op
    counts."""
    crawlers = []
    for crawler in manager:
        data = Event.get_counts(crawler)
        data['last_active'] = crawler.last_run
        data['total_ops'] = crawler.op_count
        data['running'] = crawler.is_running
        data['crawler'] = crawler
        crawlers.append(data)
    return crawlers