diff options
author | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2015-03-04 11:41:43 +0100 |
---|---|---|
committer | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2015-03-04 11:41:43 +0100 |
commit | c0b618b7ca251cdd775092c6a6c1ac8d1ae9671d (patch) | |
tree | 9e317024759543b7b5c804aa47d43ae10e8a3d01 /manager.py | |
parent | Test with the old crawler (temporary during the transition). (diff) | |
download | newspipe-c0b618b7ca251cdd775092c6a6c1ac8d1ae9671d.tar.gz newspipe-c0b618b7ca251cdd775092c6a6c1ac8d1ae9671d.tar.bz2 newspipe-c0b618b7ca251cdd775092c6a6c1ac8d1ae9671d.zip |
Updated the name of the command to invoke the crawler based on asyncio. Updated the documentation consequently.
Diffstat (limited to 'manager.py')
-rwxr-xr-x | manager.py | 12 |
1 files changed, 5 insertions, 7 deletions
@@ -20,10 +20,9 @@ Migrate(application, db) manager = Manager(application) manager.add_command('db', MigrateCommand) - @manager.command def db_empty(): - "will drop every datas stocked in db" + "Will drop every datas stocked in db." # From http://www.sqlalchemy.org/trac/wiki/UsageRecipes/DropEverything conn = db.engine.connect() @@ -59,10 +58,9 @@ def db_empty(): trans.commit() - @manager.command def db_create(): - "Will create the database from conf parameters" + "Will create the database from conf parameters." with application.app_context(): populate_g() from pyaggr3g470r.models import User, Role @@ -82,17 +80,17 @@ def db_create(): db.session.add(user1) db.session.commit() - @manager.command def fetch(user, password, limit=10): + "Crawl the feeds with the client crawler." from pyaggr3g470r.lib.crawler import CrawlerScheduler scheduler = CrawlerScheduler(user, password) scheduler.run(limit=limit) scheduler.wait() @manager.command -def fetch_old(user_id, feed_id): - "Uses the old crawler (temporary)" +def fetch_asyncio(user_id, feed_id): + "Crawl the feeds with asyncio." with application.app_context(): populate_g() from pyaggr3g470r.models import User |