aboutsummaryrefslogtreecommitdiff
path: root/pyaggr3g470r/feedgetter.py
diff options
context:
space:
mode:
authorCédric Bonhomme <cedric@cedricbonhomme.org>2014-04-13 00:42:56 +0200
committerCédric Bonhomme <cedric@cedricbonhomme.org>2014-04-13 00:42:56 +0200
commitcc92bc3d4e72c8e50e0478ada930425e14701307 (patch)
tree05d242d7547c5e80176494c918c879a64e168dc3 /pyaggr3g470r/feedgetter.py
parentHTML export now working on Heroku. (diff)
downloadnewspipe-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.py14
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:
bgstack15