From 45357e6cc1f4c7ad411fb35c5cc2b305bdbee3ea Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Sun, 13 Apr 2014 13:04:03 +0200 Subject: Added comments. --- pyaggr3g470r/views.py | 7 ++----- 1 file 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()) -- cgit