aboutsummaryrefslogtreecommitdiff
path: root/manager.py
diff options
context:
space:
mode:
Diffstat (limited to 'manager.py')
-rwxr-xr-xmanager.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/manager.py b/manager.py
index 1c038dd6..272dfc2e 100755
--- a/manager.py
+++ b/manager.py
@@ -1,7 +1,7 @@
#! /usr/bin/env python
# -*- coding: utf-8 -*-
-from bootstrap import application, db, populate_g
+from bootstrap import application, db, populate_g, conf
from flask.ext.script import Manager
from flask.ext.migrate import Migrate, MigrateCommand
@@ -27,10 +27,10 @@ def db_create():
pyaggr3g470r.models.db_create(db)
@manager.command
-def fetch(user, password, limit=100, retreive_all=False):
+def fetch(limit=100, retreive_all=False):
"Crawl the feeds with the client crawler."
from pyaggr3g470r.lib.crawler import CrawlerScheduler
- scheduler = CrawlerScheduler(user, password)
+ scheduler = CrawlerScheduler(conf.API_LOGIN, conf.API_PASSWD)
scheduler.run(limit=limit, retreive_all=retreive_all)
scheduler.wait()
@@ -66,5 +66,9 @@ def fetch_asyncio(user_id, feed_id):
feed_getter = crawler.retrieve_feed(loop, g.user, feed_id)
loop.close()
+from scripts.probes import ArticleProbe, FeedProbe
+manager.add_command('probe_articles', ArticleProbe())
+manager.add_command('probe_feeds', FeedProbe())
+
if __name__ == '__main__':
manager.run()
bgstack15