aboutsummaryrefslogtreecommitdiff
path: root/src/manager.py
diff options
context:
space:
mode:
authorFrançois Schmidts <francois.schmidts@gmail.com>2016-02-02 23:15:37 +0100
committerFrançois Schmidts <francois.schmidts@gmail.com>2016-02-02 23:15:37 +0100
commit082bf39a7dd7296d4f51b6b124d185135dc00989 (patch)
tree6e12cf2b67b016aff38874c389b5bf8b5242749a /src/manager.py
parentfixing logging (diff)
parentreload and fold all button (diff)
downloadnewspipe-082bf39a7dd7296d4f51b6b124d185135dc00989.tar.gz
newspipe-082bf39a7dd7296d4f51b6b124d185135dc00989.tar.bz2
newspipe-082bf39a7dd7296d4f51b6b124d185135dc00989.zip
Merge branch 'feature/categories'
close #22 close #23
Diffstat (limited to 'src/manager.py')
-rwxr-xr-xsrc/manager.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/manager.py b/src/manager.py
index e1f0878b..f7240670 100755
--- a/src/manager.py
+++ b/src/manager.py
@@ -12,6 +12,7 @@ Migrate(application, db)
manager = Manager(application)
manager.add_command('db', MigrateCommand)
+
@manager.command
def db_empty():
"Will drop every datas stocked in db."
@@ -19,6 +20,7 @@ def db_empty():
populate_g()
web.models.db_empty(db)
+
@manager.command
def db_create():
"Will create the database from conf parameters."
@@ -26,6 +28,7 @@ def db_create():
populate_g()
web.models.db_create(db)
+
@manager.command
def fetch(limit=100, retreive_all=False):
"Crawl the feeds with the client crawler."
@@ -34,6 +37,7 @@ def fetch(limit=100, retreive_all=False):
scheduler.run(limit=limit, retreive_all=retreive_all)
scheduler.wait()
+
@manager.command
def fetch_asyncio(user_id, feed_id):
"Crawl the feeds with asyncio."
@@ -63,7 +67,7 @@ def fetch_asyncio(user_id, feed_id):
if user.activation_key == "":
print("Fetching articles for " + user.nickname)
g.user = user
- feed_getter = crawler.retrieve_feed(loop, g.user, feed_id)
+ crawler.retrieve_feed(loop, g.user, feed_id)
loop.close()
from scripts.probes import ArticleProbe, FeedProbe
bgstack15