diff options
author | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2014-04-13 00:42:56 +0200 |
---|---|---|
committer | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2014-04-13 00:42:56 +0200 |
commit | cc92bc3d4e72c8e50e0478ada930425e14701307 (patch) | |
tree | 05d242d7547c5e80176494c918c879a64e168dc3 /pyaggr3g470r/feedgetter.py | |
parent | HTML export now working on Heroku. (diff) | |
download | newspipe-cc92bc3d4e72c8e50e0478ada930425e14701307.tar.gz newspipe-cc92bc3d4e72c8e50e0478ada930425e14701307.tar.bz2 newspipe-cc92bc3d4e72c8e50e0478ada930425e14701307.zip |
Whoosh search is now working (but not on Heroku).
Diffstat (limited to 'pyaggr3g470r/feedgetter.py')
-rw-r--r-- | pyaggr3g470r/feedgetter.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/pyaggr3g470r/feedgetter.py b/pyaggr3g470r/feedgetter.py index cf0cd44c..c5bac3c8 100644 --- a/pyaggr3g470r/feedgetter.py +++ b/pyaggr3g470r/feedgetter.py @@ -171,13 +171,13 @@ class FeedGetter(object): user_id=self.user.id, feed_id=feed.id) articles.append(article) - # add the article to the Whoosh index - """ - try: - search.add_to_index([article], feed) - except Exception as e: - pyaggr3g470r_log.error("Whoosh error.") - pass""" + # add the article to the Whoosh index only if we are not on Heroku + if not conf.ON_HEROKU: + try: + search.add_to_index([article], feed) + except Exception as e: + pyaggr3g470r_log.error("Whoosh error.") + pass # email notification if conf.MAIL_ENABLED and feed.email_notification: |