aboutsummaryrefslogtreecommitdiff
path: root/manager.py
diff options
context:
space:
mode:
authorFrançois Schmidts <francois.schmidts@gmail.com>2015-07-31 13:15:16 +0200
committerFrançois Schmidts <francois.schmidts@gmail.com>2015-07-31 13:15:16 +0200
commit3b3f188e1558987a8a14dc303912e208f77c7b60 (patch)
treeaa75bab5040e0c15db0d3c9942695779e2c696c7 /manager.py
parentThe numver ov values of the splited string is variable (sometimes the charset... (diff)
downloadnewspipe-3b3f188e1558987a8a14dc303912e208f77c7b60.tar.gz
newspipe-3b3f188e1558987a8a14dc303912e208f77c7b60.tar.bz2
newspipe-3b3f188e1558987a8a14dc303912e208f77c7b60.zip
adding munin probes
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