diff options
author | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2014-04-13 13:04:03 +0200 |
---|---|---|
committer | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2014-04-13 13:04:03 +0200 |
commit | 45357e6cc1f4c7ad411fb35c5cc2b305bdbee3ea (patch) | |
tree | 734019787d5e0543c4495abd1c411ec425527670 /pyaggr3g470r | |
parent | The crawler is launched in a other process. (diff) | |
download | newspipe-45357e6cc1f4c7ad411fb35c5cc2b305bdbee3ea.tar.gz newspipe-45357e6cc1f4c7ad411fb35c5cc2b305bdbee3ea.tar.bz2 newspipe-45357e6cc1f4c7ad411fb35c5cc2b305bdbee3ea.zip |
Added comments.
Diffstat (limited to 'pyaggr3g470r')
-rw-r--r-- | pyaggr3g470r/views.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/pyaggr3g470r/views.py b/pyaggr3g470r/views.py index c2f49717..c6828b25 100644 --- a/pyaggr3g470r/views.py +++ b/pyaggr3g470r/views.py @@ -27,6 +27,7 @@ __copyright__ = "Copyright (c) Cedric Bonhomme" __license__ = "AGPLv3" import os +import subprocess import datetime from flask import render_template, jsonify, request, flash, session, url_for, redirect, g, current_app, make_response from flask.ext.login import LoginManager, login_user, logout_user, login_required, current_user, AnonymousUserMixin @@ -186,14 +187,10 @@ def home(): def fetch(feed_id=None): """ Triggers the download of news. + News are downloaded in a separeded process, mandatory for Heroku. """ - #feed_getter = feedgetter.FeedGetter(g.user.email) - import os, subprocess cmd = ['python', conf.basedir+'/fetch.py', g.user.email, str(feed_id)] p = subprocess.Popen(cmd, stdout=subprocess.PIPE) - - #feed_getter = crawler.FeedGetter(g.user.email) - #feed_getter.retrieve_feed(feed_id) flash("Downloading articles...", 'success') return redirect(redirect_url()) |